I created an Asp.net website with the 4.5 framework, it works fine in Visual studio with sitename (http://localhost:8080/Mywebsite/Default.aspx) but it is not at the IIS level after deployment.
This is how it is deployed:
Deployment picture
When we try to consult the application with the URL http://localhost:8080/Mywebsite/Default.aspx, we receive an error message.
An error has occurred in the error page: http://localhost:8080/Mywebsite/Default.aspx: The file 'Mywebsite/Default.aspx' does not exist.
Thank you for your help
I have found the solution for the one who will encounter the same situation:
after creating the website in IIS, we create a folder with the name Mywebsite1 under the directory C:\initpub\Mywebsite1 to have at the end C:\initpub\Mywebsite1\Mywebsite1, after we return to IIS and we create an application under the website initially created and we give it a name like Mywebsite1 for my case.
In this way, we can access our website with the url http://localhost:8080/Mywebsite/Default.aspx
Deployment Image
So I am getting the rather common HTTP Error 502.5 - Process Failure now that I've hosted my project on a server VM running Windows Server 2016. While troubleshooting, I've attempted most of the solutions proposed for the same error:
ASP.NET Core 1.0 on IIS error 502.5.
Nothing else helped, so I'm looking at the answer that received the most upvotes. This mentions running the following command to receive a more meaningful message describing the error:
C:\fullpath\dotnet C:\fullpath\PROJECT.dll
I am honestly not sure how to execute that. What I did was navigate to the published project's containing folder on the server through the cmd, and issue the command like so:
dotnet .\My_Project Integration.dll
But the console prints this in response:
No executable found matching command "dotnet-.\My_Project"
Notice how the DLL is titled 'My_Project Integration.dll, however the word 'Integration' is absent from the console response. I do not know whether the underscore is to blame here, but any help is appreciated getting the command to run.
And of course, if you know of a solution to the actual 502.5, that is welcome as well.
You've likely got this issue: https://github.com/aspnet/Home/issues/1931. The ASP.NET Core IIS Module reads the Web.config to determine what to execute to run the app.
You said running dotnet ".\My_Project Integration.dll" worked successfully and enabling stdout showed the same issue of the path being truncated after the space.
Two options:
Remove the space from your project (this would be the easiest option)
Update your Web.config
If you do #2, your Web.config needs to have something like this for the arguments attribute:
arguments='".\My_Project Integration.dll"'
Without changing any code I am getting wierd errors after updating visual studio 2015. Basically its saying:
An exception of type 'System.Data.Entity.Core.EntityException'
occurred in EntityFramework.SqlServer.dll but was not handled in user code
Additional information: The underlying provider failed on Open.
Unhandled Exception Error - Login Failed for User
When trying to access the DataBase. I am using SQL server 2014, and have changed no code in solution and changed nothing in SQL Server MS, it must be related to the latest update for visual studio released around 15/12/15. I can access the database from SQL Server ok, and can see all setting etc. But as i said I have changed nothing at all, just updated visual studio.
Has anyone else encountered this error in last few days? It is very strange, and seems unusual as im only trying to access local DB .\SQLEXPRESS
This is method where error occurs:
private static string GetSchemaVersion()
{
var dataRepository = new GenericRepository();
return dataRepository.GetAll<SchemaVersion>().Max(s => s.CurrentVersion).ToString();
}
Ok so I feel pretty stupid.. Error solved, The problem was the authentication mode changed to SQL only, it should be windows and sql authentication. It must have changed during an update. I changed that, restarted server restarted visual studio, rebuilt/cleaned project and everthing worked fine.
Everything was working fine and all of a sudden I started getting the following error for all my web projects and websites. One thing is for sure that this is IIS issue since the compiler is not even reach the code.
Error Message:
HTTP Error 500.0 - Internal Server Error
Tracing area "Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI,WebSocket,Rewrite,RequestRouting,iisnode" is not recognized
I've already tried following things one by one but no luck:
Re-install Tracing - 'Turn Windows features on or off',
Re-install IIS,
aspnet_regiis -i (also tried with -u),
Removed ISAPI .DLL
Windows Features:
I'm using Visual Studio 2013 to build a web project (asp.net C#).
I would really appreciate any help/information on this Issue.
I removed below tag from applicationhost.config file located under C:\Users\Sanket\My Documents\IISExpress\config path on windows 7 machine.
<add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI,WebSocket,Rewrite,RequestRouting,iisnode" verbosity="Verbose" />
See if this helps.
From Richard Marr's Blog here, following solutions are listed and second solution worked for me.
Using Programs and Features find the Extension that is missing trace areas, right click select REPAIR.
Manually add the trace areas to the Applicationhost.config file as shown below. Remember to add in the "WWW Server" xml Node.
Sanket's suggestion works, but for me what was missing was
<add name="RequestRouting" value="2048" />
a few lines above in the applicationhost.config file, where all areas are defined. Adding this fixed it.
Btw. using VS2015 also fixes the problem without editing the .config file.
Do you have all modules listed in error message installed? You can download extensions here: (link for rewrite module) http://www.iis.net/downloads/microsoft/url-rewrite
To add to Sanket's solution:
In case you are not using IIS Express, in
C:\Inetpub\Wwwroot\Web.Config
Delete the line with:
"Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI,WebSocket,Rewrite,RequestRouting,iisnode" verbosity="Verbose"
In my case I was getting the error in IIS (NOT IIS express). I answered this question here:
https://stackoverflow.com/a/51717759/2817987
Hi I just tryed to run my application fopr the first time on IIS.
Everything worked find while developing on visual studio but when I added the app to IIS I got this error:
Cannot open user default database. Login failed.
Login failed for user 'IIS APPPOOL\forum'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open user default database.
What should I do the site works when I run it from visual studio?
EDIT
I did a litle more digging and I managed to find out that I needed to setmy application pool identity to NetworkService I did that but now I got another error :
Unable to open the physical file "D:\Projects IDE\Visual Studio\MyWork\Websites\Forum\App_Data\ASPNETDB.MDF". Operating system error 5: "5(Access is denied.)".
An attempt to attach an auto-named database for file D:\Projects IDE\Visual Studio\MyWork\Websites\Forum\App_Data\ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Please check two places
1 Access to folder for the NetworkService identity(default for IIS app pool) or for this one(IIS APPPOOL\forum)
2 Connection string credetial. And if there "Integrated security". Provide Specific user and passwrod there.
I received this non explicit error because I had the Application Pool set to .NET 2.0 as opposed to .NET 4.0 on a service that was responsible for authentication. Typically when the framework is incorrect a different type of error about a non-recognized framework .dll is displayed, but not in this case. If this happens, check the following:
The value after IIS APPPOOL is the name of the application pool this current process is run under. In your case there was an AppPool named forum.
Check that the app pool is using the corrected pipeline and .NET Framework required for the application being run.