When I create a deployment package in the Properties window of the project (Package/Publish Web) and specify from Items to Deploy ComboBox:
Only files needed to run this application, then deploy it in the production server, the code-behind files are not copied into the web site and the web app does not run any of the C# code-behind.
What am I missing? How do I make a call to the web app assemblies?
When you deply application to production server, only dll file and content files will be copy. It won't copy code-behind , So you can check dll reference in bin folder or error if any .
Regards,
Quan Truong
Please, click 'Mark as answer' if you think my answer really help you. Thanks
Marked as answer by Angie xu - MSFT on Dec 23, 2012 11:59 PM
Quantt is right, .cs file is compiled into dll file, dll file will be copy when you deploy web application to server, and it will extract the codes and execute the codes from dll when you execute the application.
And it’s different in web Application and web site when you pack them. The code-behide of web Application is compiled into dll file when pack it, but you can see .cs file when you pack web site.
hope it helps you,
Kind regards
Please mark the replies as answers if they help or unmark if not.
Feedback to us
Yes, it packed the code-behind as dll alright. My question is, why isn't it executing the codes when I deploy the web app into the host server? The web pages are rendered. But when I click the button that supposed to trigger the code-behind, it does nothing.
I tried adding an import statement (Import the dll) into every web page; it still doesn't work.
But when I click the button that supposed to trigger the code-behind, it does nothing
I don't think it's an issue with the way you published your application. It seems occured because of something wrong with your code. Check the browser console and see whether there are any errors on it. Some script error might preventing the code behind
from firing.
check ur code and publish ur website under Publish Method: File System and then upload ur whole folder which contains published pages and dll's on webserver set default.aspx page to start page on server and then run ur page and ya also set ur website application
pool version to ur asp.net framework version
mgambone
0 Points
25 Posts
Building Deployment Package in VS2010
Dec 14, 2012 02:13 PM|LINK
Hi,
When I create a deployment package in the Properties window of the project (Package/Publish Web) and specify from Items to Deploy ComboBox: Only files needed to run this application, then deploy it in the production server, the code-behind files are not copied into the web site and the web app does not run any of the C# code-behind.
What am I missing? How do I make a call to the web app assemblies?
quantt
Member
215 Points
38 Posts
Re: Building Deployment Package in VS2010
Dec 16, 2012 12:12 PM|LINK
When you deply application to production server, only dll file and content files will be copy. It won't copy code-behind , So you can check dll reference in bin folder or error if any .
Quan Truong
Please, click 'Mark as answer' if you think my answer really help you. Thanks
mgambone
0 Points
25 Posts
Re: Building Deployment Package in VS2010
Dec 17, 2012 02:09 PM|LINK
It does copy the project dll in the bin folder. But it still doesn't execute the code-behind.
Angie xu - M...
All-Star
18664 Points
1590 Posts
Microsoft
Re: Building Deployment Package in VS2010
Dec 20, 2012 02:40 AM|LINK
Hi mgambone
Quantt is right, .cs file is compiled into dll file, dll file will be copy when you deploy web application to server, and it will extract the codes and execute the codes from dll when you execute the application.
And it’s different in web Application and web site when you pack them. The code-behide of web Application is compiled into dll file when pack it, but you can see .cs file when you pack web site.
hope it helps you,
Kind regards
Feedback to us
Develop and promote your apps in Windows Store
mgambone
0 Points
25 Posts
Re: Building Deployment Package in VS2010
Dec 21, 2012 12:33 PM|LINK
HI,
Yes, it packed the code-behind as dll alright. My question is, why isn't it executing the codes when I deploy the web app into the host server? The web pages are rendered. But when I click the button that supposed to trigger the code-behind, it does nothing.
I tried adding an import statement (Import the dll) into every web page; it still doesn't work.
Ruchira
All-Star
43068 Points
7045 Posts
MVP
Re: Building Deployment Package in VS2010
Dec 23, 2012 04:13 PM|LINK
Hello,
I don't think it's an issue with the way you published your application. It seems occured because of something wrong with your code. Check the browser console and see whether there are any errors on it. Some script error might preventing the code behind from firing.
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.rachanapandy...
Member
10 Points
8 Posts
Re: Building Deployment Package in VS2010
Dec 24, 2012 06:12 AM|LINK
check ur code and publish ur website under Publish Method: File System and then upload ur whole folder which contains published pages and dll's on webserver set default.aspx page to start page on server and then run ur page and ya also set ur website application pool version to ur asp.net framework version