I have a separate module that I would like to add to a currently working umbraco installation. This particular module is actually quite simple, it connects to a sql, do some query, and put it out on tables.
There are some aspx pages, which has its own cs code files. There are couple cs files in App_code folder, which basically for session and open/close connection to the database.
There's small couple lines of codes in global.asax for session_start. I googled and read the forum about making it http module, but it doesn't seem to apply to session, only for application start/end.
How can I integrate all these into an existing umbraco installation? Some forum suggestions said to put all cs in the App_code folder, but this caused application error when browsing the main page of the existing umbraco installation.
Reserve a directory in the umbraco config and use the pages as they are.
All these options has advantages and drawbacks. XSLT will let you alter the html separated from the db/session code, but config settings etc. should not be in the xslt file. User controls will give you more control, but you will need to install a package to edit the ascx files.The last option can be very fast for existing pages, but it separates it from the Umbraco backend and you can no longer add the functionality to umbraco pages and templates.
You should find more info on all of these techniques on the forum, or ask here if you have any further questions,
If I reserved this as a separate directory, this probably wouldn't go along with the rest of the site. I might go with converting the code behind as a user control. As for deleting the global asax dll, I also read from the forum that it should be done from version 4.5 and up. I'm currently using 4.0.4.2. There isn't any straight forward method to do this, so it seems.
Existing aspx, cs and global.asax
I have a separate module that I would like to add to a currently working umbraco installation. This particular module is actually quite simple, it connects to a sql, do some query, and put it out on tables.
There are some aspx pages, which has its own cs code files. There are couple cs files in App_code folder, which basically for session and open/close connection to the database.
There's small couple lines of codes in global.asax for session_start. I googled and read the forum about making it http module, but it doesn't seem to apply to session, only for application start/end.
How can I integrate all these into an existing umbraco installation? Some forum suggestions said to put all cs in the App_code folder, but this caused application error when browsing the main page of the existing umbraco installation.
Hi there,
depending on the functionality you can either
All these options has advantages and drawbacks. XSLT will let you alter the html separated from the db/session code, but config settings etc. should not be in the xslt file. User controls will give you more control, but you will need to install a package to edit the ascx files.The last option can be very fast for existing pages, but it separates it from the Umbraco backend and you can no longer add the functionality to umbraco pages and templates.
You should find more info on all of these techniques on the forum, or ask here if you have any further questions,
Cheers,
Harald
The reason you got an error is because there's already an App_Global.asax.dll file in Umbraco/bin directory.
Delete this file and add your global.asax back, however it's advised not to be in the App_Code directory.
For further reading check out this thread http://our.umbraco.org/forum/developers/extending-umbraco/2225-Need-to-access-events-in-the-global?p=1
Basically one of the core team state that the Umbraco App_Global.asax.dll doesn't actually do anything so can be safely removed.
Then with regards to using your existing cs code, you can implement it as above.
HTH
Rich
If I reserved this as a separate directory, this probably wouldn't go along with the rest of the site. I might go with converting the code behind as a user control. As for deleting the global asax dll, I also read from the forum that it should be done from version 4.5 and up. I'm currently using 4.0.4.2. There isn't any straight forward method to do this, so it seems.
is working on a reply...