I have a set of ASP.NET membership tables online with my hosting with godaddy. I can run my site locally and connect to the online membership table fine and can create accounts etc.. So basically I got everything hooked to reference everything online.
But I get a 500 Internal Service error when I try to view the site. I can't look at the event viewer cause godaddy does not allow that. When I rename the web.config and refresh the site I can either get to the login or register page but when it try to save data it bombs.
So is their a good web.config analyzer that can tell me whats wrong? Cause it works locally referencing online db so it should work fine, right?
Thanks
You can get a lot of information out of trace or add a logger like log4net and write log messages to a text file. That can tell you what is wrong.
Related
error photo Hello. I making my first website.Visual studio.For authentication i use Identity tool. In localhost it work fine i can reach everything, but after publishing it to iis or smartasp.net i cant enter login and register pages.Other pages work good. When i click login it show http error 500 This page isnt working right now. Localhost cant currently handle this reÄ…uest.
Someone maybe had the same issue? It looks like i have to do something with identity because i can enter other pages.
Maybe before publish i have to change something?
First i make publish to iis. Login page got that error. I took maybe problem in iis. Than i used smartasp.net but the issue is same
I just created a webform that is hosted in my Azure subscription. I set it up with authenication via my works Azure directory for authenticating users. In debug this works fine and I am able to login with my work credentials and then view the website via local host.
I have published this to my Azure and it says it is running and working fine. So when I try to connect to the website it continuously redirects me to the localhost resulting in an error.
I have checked the web config.
Here is the google network chain of events when it occurs.
I am really lost as to what is wrong and what I need to do to fix this so any help would be greatly appreciated. I'm sorry I can't offer more but I don't even know what is wrong to begin with or where to look. Is there some setting in Azure that I need to add the website too?
I have solved this issue. Since it was such a pain I will keep this up as I couldn't find any answers on this. It was actually quite simple.
You have two options. The one I did and which worked was changing the publish profile as below:
Add the domain where the authentication is occurring. So if you have your web app hosted by a different azure account that which is authenticating the users, use the one that is authenticating.
This will create two versions of your app on the site one for local host and one for the actual site.
The second option(I have not tried this but it should work) is to go to the Azure account where you are authenticating the users and go to applications and then configure. Change the APP URL from local host to the url you are trying to get to.
Here is an excellent link that explains how to do this clearly.
Click this link for detailed explanation
I also had this issue and took these steps to resolve
navigate to the app registration in AAD
Open the manifest
Change the ReplyUrl to the url of the app (e.g. http://appname.azurewebsites.net)
Then I got the error
Bad Request - Request Too Long HTTP Error 400. The size of the request headers is too long.
Next I cleared all cookies from the browser, and this changed the error to just
Bad Request
So I went back to that ReplyUrl and changed it to https://appname.azurewebsites.net/.auth/login/aad/callback and now it appears to work.
Note I also had to make sure I didn't have the site open in any other tabs before it started working
I had this issue when I switched an app from our company Azure over to a customer's Azure. In my case I'd forgotten to update the ida:ClientId, ida:AADInstance and ida:TenantId, which then meant that the value I'd set for ida:PostLogoutRedirectUri was ignored (I think) and instead my app redirected to localhost.
Once I changed those ida values to the values from the app settings and subscriptions settings on our customer's Azure it all worked as expected.
It took a while to track down all the values in Azure portal as they are all called something different, or aren't named at all:
ClientId can be found at Azure Active Directory > App Registrations > YourAppName. It's called 'Application ID' in Azure
Domain can be found on Azure Active Directory > Overview. It's currently in the top left in the format somename.onmicrosoft.com
TenantId this is the Azure AD instance ID, get that from Azure Active Directory > Properties and then it's called 'Directory ID'
I spent a lot of time trying to work out where the localhost port that was being redirected to was in the code, but it simply isn't there as far as I can see, so I have no idea how Azure was choosing what localhost address to redirect to!
You need to set another parameter in configuration that is replyUrl and assign to your web app, other wise it takes the url from which it was originated.
I was able to fix this by changing my Startup.Auth.cs file redirectUri from "https://localhost:44316/" to https://myapp.com/
I have a RESTful service on a server whose url say is www.webserve.com
i have a proxy client on my local machine to hit and get the details from this service.. the client has a page name default.aspx which post and hit the www.webserve.com and get the data.
it works fine but as soon as i upload this client on the same server(IIS) with a name say www.proxyclient.com and open it with my browser the default.aspx works fine but as soon as i post the data and hit the service through it it gives mt a 404 error..
I dont know whats wrong with it.. may be this is the static vs dynamic IP mess or something like that..
can u please help me out. i need to get this done on urgent basis
Thnx guys
Alright got the solution. my proxyclient was using a handler to handle a custom extension. I mapped that extension to IIS with aspnet dll and it worked.. thnx guys for ur support :)
Actually I needed to register .svc to my IIS ISAPI with .net framework dll
then it worked fine :)
I have been trying to configure a small website on a Windows Server 2008 running IIS 7. Unfortunately, when trying to load the website I keep getting the error: Server Error 401 - Unauthorized: Access is denied due to invalid credentials.
The permissions on the website folder include read, write, and execute for user ASP.NET v4.0. I even clicked "Check names" before adding the user to folder, to make sure that I spelled everything correctly. But the error continues to show. Also, I noticed that everything works okay if I add "Users" to the permissions for the folders containing the website, but I don't see why this should be necessary. I only want to give ASP.NET v4.0 access to the folder.
Some other noteworthy points include that I'm using the ASP.NET v4.0 application pool, that the managed pipeline is integrated, and that load user profile is set to true.
If anyone has any ideas, I'd appreciated the help. I'm stumped!
EDIT: Does it matter that the website is on the d: drive? I just assumed this wasn't important...
I find I always need to give IIS_IUSRS access.
I'd recommend you to use the Process Monitor to detect which user is actually accessing the file.
Here you'll find an explanation about how to achieve that.
Open IIS7 on the server. Highlight the site, and double-click on the Authentication icon in the Security Section. Check that Anonymous Authentication is enabled.
Some troubleshooting links for this particular issue:
http://support.microsoft.com/kb/902160
http://support.microsoft.com/kb/907273
i'm using VS 2008, asp.net, framework 3.5
this is the first time i built an asp.net website.
the site is quite simple, with some pages getting there text onLoad from a DB (ms access),
and some with plain text.
it works fine on debugging.
i used publish web site, and got a preCompiled website folder on my computer.
i copied all the files to my hosting server.
the pages that don't need DB work fine, all the ones that call the DB on loading are not found.
i thought it was permissions, but the hoster checked it up with me. the db folder has all permissions.
i have 2 questions:
1. how do i get exact info on the error, better than 404 ??
2. what's happening? why doesn't it work?
thanks for reading this far..
I know it sounds obvious but did you leave your testing connection string in the web.config or where so ever you keep it?
You may have used an alias for the DB you are using on your local machine but your ISP will not have the same alias. That would be my first port of call.
To get a better error message you could turn off custom errors in your web.config and perhaps use trace.axd.