I am trying to deploy an ASP.NET 3.5 Web Application to my production server and I am using the Web Deployment Project for this purpose. I have a folder named MasterPages in the root of the application which contains all the master page files. When I build this project in the release mode and deploy it on to the server I am getting the below error message:
Directory 'C:\inetpub\wwwroot\MasterPages' does not exist. Failed to start monitoring file changes.
I am using ASP.NET AJAX and the ToolkitScriptManager is on the master pages. I have noticed that the MasterPages folder is missing from the release build. Can anyone help me with this?
The actual problem was with the CombineScripts property of the ToolkitScriptManager. It was set to true but when I set it to false everything works.
Related
This is not as straight forward as I had hoped.
I created a Web Site project on my development machine using the Visual Studio C# template for a WebSite Project. (Visual studio 2010 .net 4.0). The project name is C:\Nova5\WebSite3. It consists solely of:
the Bin subdirectory
Nova.svc file
web.config file
It has been tested to run correctly by:
Setting the website as the startup project, then
Run Debug-->Start Debugging
When tested, the NovaDataService information page is correctly displayed. It also correctly works when used through my client project.
I followed the recommended procedure described at
Walkthrough: Converting a Web Site Project to a Web Application Project in Visual Studio to covert the Web Site to a Web Application.
I now have the following problems and/or difficulties:
If I use the recommended procedure for testing the web site:
-- File | Open | Web Site
-- Build Web Site -- Start Debugging
I get the Error: The type 'Nova5WCFServiceLibrary.NovaDataService', provided as the Service attribute value in the ServiceHost directive, or provided in
the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
Since, I think, the WebSite does work, I skipped this error and moved on to the next part of the article. The next issue (?) is there is no App_Code file in the WebSite. Is this necessary? If it is necessary, how should I create it? Or do I need to create another WebSite project from its template just to have it?
I did not copy the Nova.svc nor the web.config from the WebSite to the Web Application as none of the references I read indicated to do so. Should I copy these files to the Web Application as well?
I now used the "Convert to Web Application" on the Web Application project and recompiled the solution. Everybody is happy. No errors reported. So how do I now test the Web Application project on my development machine (which also has the client application) ?
TIA
I've got a Visual Studio 2010 MVC 3 Project that I'm trying to deploy using the Web Deploy Publish option from within Visual Studio. Whenever I try to deploy I get the following error:
It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This
error can be caused by a virtual directory not being configured as an
application in IIS.
When I google the above error I find that people say to either configure the virtual directory as an application, or to check for nested web.config files.
The site runs fine when I deploy the project to it manually, so I believe the site is configured properly. I don't have an application below the site tho, as the site itself is set up as the application.
Also while MVC projects do have nested web.config files (one in the root and one in the views folder) renaming the views web.config file didn't fix the error.
Have you tried deleting your complied code in the obj folder and re-compiling?
My IT department and I are trying to get an ASP.NET web application to run on a Linux with Mono. We have been working on this for about a month to no avail. The Mono setup on the Linux server seems to be good. We are able to run the demo ASP.NET pages on the server and they work fine.
I developed my ASP.NET web application with Visual Studio 2008, and I recently downgraded the application to ASP.NET 2.0. Originally it was in ASP.NET 3.5, which might be the problem. After publishing the web app, I received the following files: Default.aspx, Web.config, bin (with a .dll and a .pdb file), and an empty App_Data file. So far, the error that keeps occuring is an appication error on the server.
For a simple test, I made a simple ASP.NET web app that had a label and a button. We tried that app and it did not work either. Does anyone know of things that I should look for within my ASP.NET web application that would inhibit the application to work?
Application error:
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. this tag should then have its "mode" attribute set to "Off".
!--web.COnfig Configuration File--
configuration
system.web
customErros mode+"Off"/
/system.web
/configuration
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.
!--Web.Config Configuration File--
configuration
system.web
customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/
/system.web
/configuration
Thank you,
DFM
Just for a resolution, I finally figured out what the problem was. The ASP.NET web app has an onload event that enables the web app to read an Access Db. For testing purposes, I did not update the ADO.NET Db path for the web app to read the Db so every time it was loaded through Mono, the generalized error in question would occur. After deleting the onload event, the web app functioned perfectly. Additionally, I had to downgrade the web app to ASP.NET 2.0, instead of 3.5, and delete the LINQ namespaces, which were not being used.
All I have to do is change the path(s) to point to the App_Data folder and place the Db in the folder, as well.
Will a website still work if parts of the site have compilation errors?
It depends on how you have deployed
your website. There basically two main
strategies to deploy
an asp.net application.
1.) PreCompiled deployment
In precompiled deployment you will have all your code-behind files compiled into assemblies. Further, if you are using Web Deployment projects then all those compiled assemblies will be merged into one single assembly.
So In PreCompiled deployment your website cannot be deployed without any error anywhere in the Project.
2.) XCopy deployment
In XCopy deployement you will just copy-paste your entire website to production server without compilation. In this case, only those pages are compiled,loaded and served which are requested via an HttpClient. If you have an asp.net page that has some errors, your website will not show up those error until that has been requested via any HttpClient. Remaining website continues to work without any effect from those with errors.
When you deploy an application to IIS without all files that contains code (VB/C#) then
how exactly are events & all things handled?
The VB or C# compiler compiles the ASPX pages and classes in App_Code into runtime binary DLLs. For Web projects, the DLLs get created each time you build the project; for Websites, the DLLs get created in a temp folder under c:\Windows. Maybe this is what's confusing you--you don't see the DLLs for Websites until you do Build>Publish Web Site step.
If you deploy a Website without first publishing it, mysteriously it runs! That's because the ASP.NET process implicitly calls the compiler to create the corresponding DLLs for each ASPX page.
You can prove this behavior by creating a virtual directory on your developer box over the development root of the Website. Then launch a page with http://localhost/yourappname/yourpagename.aspx. It runs! With no DLLs! They are in a project folder under C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files.
More on the publish process:
http://msdn.microsoft.com/en-us/library/1y1404zt(VS.80).aspx
In either case, once compiled, the ASP.NET lifecycle kicks in and raises events as they occur. See these links for more on that process:
http://msdn.microsoft.com/en-us/library/ms227435.aspx
http://msdn.microsoft.com/en-us/library/ms178472.aspx