简体   繁体   中英

Best Method for Converting a Web Application into an IIS Website

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM