why asp.net website dont work after publishing? - c#

I made asp.net website, that work well on local (run debug in VS). But after I succesfully publish it (using VS) to a webhosting, the website does not work.
Problems started after I added references to some 3rd party DLLs and using them.
Did I miss something when referencing these DLLs?
Thank you for your time!
Error message is:
Server Error in '/' Application.
Request timed out.
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.Web.HttpException: Request timed out.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Request timed out.]
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4075.0

Related

The file or directory is corrupted and unreadable

i've added a simple Cshtml there's nothing in it but when i run the project i get this error and i know there's sth wrong with this file bin\roslyn\csc.exe"
Server Error in '/' Application.
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.ComponentModel.Win32Exception: The file or
directory is corrupted and unreadable
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[Win32Exception (0x80004005): The file or directory is corrupted and
unreadable]
[ExternalException (0x80004005): Cannot execute a program. The command
being executed was "c:\users\mostafa\documents\visual studio
2017\Projects\InstagramAutomationPosts\Instagram_Automation_Posts\bin\roslyn\csc.exe"
/shared /keepalive:"900" /noconfig /fullpaths
#"C:\Users\Mostafa\AppData\Local\Temp\Temporary ASP.NET
Files\vs\a17df867\580bcfa2\mauhk4p3.cmdline".]
My view
#{
ViewBag.Title = "Index";
}
<h2>Index</h2>
how can i solve this issue?
Rebuilding the project solved the issue for me
i know it's not correct way to answer but what i did was (and might help someone in future),i made another project and copied everything there and it got fixed

Method not found: 'Void System.Security.Claims.ClaimsIdentity..ctor(System.Security.Claims.ClaimsIdentity)'

I'm migrating a site from one web server running IIS 7.5 on Windows Server 2008 R2 Standard to one IIS 8.5 on Windows Server 2012 R2. I'm currently receiving the message below. I know System.Security.Claims is supposed to be in the mscorlib.dll and that seems to be in place. I'm not really certain what else would be helpful in even asking this question, but if anyone has ideas to point me in the right direction, that would be great! Thanks!
Server Error in '/profile' Application.
Method not found: 'Void System.Security.Claims.ClaimsIdentity..ctor(System.Security.Claims.ClaimsIdentity)'.
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.MissingMethodException: Method not found:
'Void
System.Security.Claims.ClaimsIdentity..ctor(System.Security.Claims.ClaimsIdentity)'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[MissingMethodException: Method not found: 'Void System.Security.Claims.ClaimsIdentity..ctor(System.Security.Claims.ClaimsIdentity)'.]
System.Web.Security.FormsIdentity..ctor(FormsIdentity identity) +0
System.Web.Security.FormsIdentity.Clone() +35
System.Security.Principal.GenericPrincipal.AddIdentityWithRoles(IIdentity identity, String[] roles) +57
System.Web.Security.FormsAuthenticationModule.OnAuthenticate(FormsAuthenticationEventArgs e) +338
System.Web.Security.FormsAuthenticationModule.OnEnter(Object source, EventArgs eventArgs) +88
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +161
Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.6.1069.1
I was facing the same issue in one of our windows 2012 r2 servers. MVC applications built using forms identity were throwing errors.
We found out that a particular Microsoft update patch (KB3098785) was causing the issue.
We unistalled the patch, rebooted the server ans voila..everything was running fine
I can think of three causes:
You've missed a DLL that the application needs. Maybe a library or framework needs to be installed onto the server.
Maybe your two servers are running different versions of the .NET framework. Check both servers and see what versions they have, all the details are found on this MSDN article: https://msdn.microsoft.com/en-us/library/hh925568%28v=vs.110%29.aspx
It might be a security/permissions thing. Try changing the app pool in IIS to run as an admin, and if the problem goes away, it's a permissions problem.

Application Error on the prod

Server Error in '/' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
[No relevant source lines]
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\a6f9ad3e\7d6f22eb\App_Web_ckcrdejl.4.cs Line: 0
I am keep getting this error when i try to post the data into the database in production server

System.Web.Http.HttpConfiguration.get_ServiceResolver() not found

i've updated to the new mvc 4 RC version released this week and after deployment to azure, i got the error message:
Method not found: 'System.Web.Http.Services.DependencyResolver System.Web.Http.HttpConfiguration.get_ServiceResolver()'.
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.MissingMethodException: Method not found: 'System.Web.Http.Services.DependencyResolver System.Web.Http.HttpConfiguration.get_ServiceResolver()'.
I'm using the GlobalConfiguration.Configuration object to configure all the stuff and everything works on my machine.
Could you help me with this please?
Thanks!

Upgrade to .net 4 produces breaks webservice .asmx

I was trying upgrading to .net 4 for my WebForms asp.net project.
Now I'm getting this when I try going to the .asmx webservice.
Server Error in '/' Application.
Type 'Chickenweb.WebServ.WebServ' does not inherit from 'System.Web.UI.Page'.
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.Web.HttpException: Type 'Chickenweb.WebServ.WebServ' does not inherit from 'System.Web.UI.Page'.
It was because I'm using IIS and was using incorrect Application pool. Thanks for all your answers!
It looks like IIS thinks your .asmx file is a .aspx file. You should check the mappings in IIS to see that .asmx is enabled and properly set up.

Categories