Custom asp.net profile provider cause intermitent exception - asp.net

I got a asp.net application hosted by Godaddy. In this app I have a custom profile provider. Sometime, an ASP.Net error message prompt and Say: "Unable to cast object of type 'ProfileCommon' to type 'ProfileCommon'"
The error appear at a random time and vanish when a modification to the web.config file is made (maybe because of the rebuild of the application ?).
On my development computer and my staging server the error did not show up.
Do someone already see this error?

Related

Custom Error mode set to "RemoteOnly", debugging locally still shows custom error page

In two of our ASP.Net Web Applications, in the Web.Config file, we've set the Custom Error redirect to our custom error page, and set the mode to "RemoteOnly" so that when we debug locally we see any unhandled exception message displayed on the "Yellow Screen of Death" - "YSoD".
This week, we discovered that when an unhandled exception is encountered, all of a sudden we're getting our custom error pages, instead of the exception details in the "YSoD".
This applies to only two, of the several applications we're running. I've searched high and low for a similar problem/solution, and haven't found much.
I'm trying to determine if this is an Application, IIS, or Visual Studio configuration problem. It just started happening, and there were no significant changes made to the server, etc., to potentially explain the problem. We have enabled IIS Failed Request Tracing, but I couldn't find anything associating this with our problem.
Given this information, what can cause this sudden change in behavior?
The back-end is a SQL Server database, using Windows Authentication, on an AWS VPC.

Why does "start debugging" cause an immediate HTTP404 error?

Setup
I recently changed computers, and pulled down a codebase that had been working before. I created the application using the "Create Virtual Directory" button in Visual Studio, and I can confirm that the application shows up in IIS as an application. I know this codebase works because it's in production; I've just changed development environments.
The Problem: HTTP 404.0
When I run the application, the debugger launches and a browser tab opens to HTTP 404.0
The problem resembles this unanswered question, except I'm using IIS 10 instead of 8.5: https://serverfault.com/questions/702235/iis-8-5-instant-404-0-error-on-mvc-site
Details:
Detailed Error Information:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:80/OURMVCSITE
Physical Path D:\OURMVCSITE
Logon Method Anonymous
Logon User Anonymous
What I've tried
Many StackOverflow answers point to issues with the RouteConfig or Global.asax.cs. I've set breakpoints in both; neither class is ever executed.
The app pool is the default app pool running in Integrated mode under the Network Service user, and Network Service has access to every file and folder in the directory.
Searching for answers in general is somewhat difficult because most results are about creating custom 404 error pages for when users incorrectly enter a URL.

Server cannot access application directory asp.net

I am trying to access Web Site Administration Tool > security. When I click on security I got the following error:
There is a problem with your selected data store. This can be caused
by an invalid server name or credentials, or by insufficient
permission. It can also be caused by the role manager feature not
being enabled. Click the button below to be redirected to a page where
you can choose a new data store.
The following message may help in diagnosing the problem: Server
cannot access application directory 'C:\Users\Ramisha
Farrukh\Documents\Visual Studio 2015\WebSites\IT Help Desk]\'. The
directory does not exist or is not accessible because of security
settings.
One day before I can access it but today It gives me the error I don't know what cause this error to occur. Please anyone help me.

Server error when copying ASP.NET code to another host

Sorry for the simple question.
I have moved a site to a host by simply copying the code but even the first login page fails if I include the following :-
In Web.config file..if I add the following
or...
Aspx page..if I include a reference to a class file ( which does exist in the app_code directory )
Sign In <%If clsGeneral.str(Request("timeout")) = "t" Then Response.Write(" - YOUR SESSION EXPIRED")%>
I get the error...
Server Error in '/' Application.
Runtime 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.
etc...
Copying an application from one host to another is only simple in the file copy. There are a number of issues that may arise from the application running on the "new" server. For example, is the server running the same version of IIS? Is IIS configured properly for this application? Etc ... to see what error the application is throwing, inspect the Application Log in the event viewer on the server. This will give you some hint as to what the issue is. Without that information, there's really no place you can start, except maybe turning off the custom error or error suppression to see the error details in the browser. But I would recommend that you inspect the Application event log on the server.

ASP.NET Web Application Error

I have an application with the main and 2 sub pages. The main page works and one of the sub pages work fine. But the other sub page gives me an error:
Runtime 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".
When trying to run on my local, i get
An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
These were working fine a week ago and this problem is sudden. help please.
You are facing this issue because the SubPage you are getting error on accessing might be under some security. The error you have described comes on a page which is not accessible to the anonymous user.
You must check the Web.config firstly to see if there is some Location Access permissions defined for that Webpage and ensure that they are correctly defined.
You may read about more to this problem by a previous Answer.
web site configuration

Resources