Reputation: 1561
I have a Web Application and want to move/make it as a IIS website
1. Not Copying the DLL
When I copy every part of the code except the Web Application's built DLL file I come up with an error "could not load type ..."
2. Copying the DLL
cloning that DLL also shouldn't be practical.
If we copy the DLL so the site will work as expected
but after any changes to code-behind other problems will occur
"... does not contain a definition for btnABC_Click() ...."
What should be our decision or strategy in this case
-- I want to make an IIS-Version of the project because of fixing some addressing-Paths issues
thanks in advance
Upvotes: 0
Views: 643
Reputation: 25200
When the Web site runs, ASP.NET code in your Web page doesn't call the C# code that you've written in your code-behind files. Rather, it calls a compiled version of that C# code that is in the application's DLL file.
So the C# code in the code-behind must be compiled after any change into a new version of what you refer to as the "web application's built DLL".
Otherwise your Web page will refer to an old version of the DLL, hence the errors "... does not contain a definition for ...".
You may want to investigate the walkthrough here: http://msdn.microsoft.com/en-us/library/1y1404zt(v=VS.100).aspx
and read the background material here: http://msdn.microsoft.com/en-us/library/377y0s6t.aspx
as they explain in fine detail what you'll need to do.
Upvotes: 2