I develop my website using asp.net c#. There's completely no problem when I debugging my project or test on my local IIS.
but when published on my IIS server, it keep showing "Requested URL cannot be found" error and need about 3 times refresh to show the page normally.
please see the screenshoot here (sorry I'm not allowed to post picture yet):
Can anybody please tell me what's wrong? Is this error caused by IIS configuration or something?
This may due to poor IP communication with your IIS Server.
Some tips are here, just try with:
1. Open the IIS Error log file and see what is happening with your hosted website.
2. Try with clearing your browser cache completely.
3. Check with other web sites also, whether they are working or not…
a) If not, then problem with your internet/intranet connection.
b) If yes, then check with your firewall to ensure that is not preventing you to reaching the website/internet.
Related
So, I'm publishing an app on Azure and I'm getting this error message:
This mywebsite.azurewebsites.net page can’t be found
No webpage was found for the web address: https://mywebsite.azurewebsites.net/
HTTP ERROR 404
Locally the app is working normally, including already connected with the remote DB (on azure and with all permissions granted), but when I try to publish the app, it publishes but as a 404 error page from the browser.
Any thoughts about how to fix that?
That's the config that allow me to deploy on azure
To complement, I have the swagger on my app, even when I type mywebsite.azurewebsites.net/swagger or mywebsite.azurewebsites.net/swagger/index.html I have the same 404 error.
There could be various root causes for 404 error messages for users who are experiencing the same problem. Sub-status codes will aid in your understanding of the problem.
You can use the Kudu Console to see if the site files have been distributed correctly. Also, if you haven't done so already, Enable diagnostics logging for web apps in Azure App Service to verify the whole problem details and underlying cause.
I have a .net core web app that works well in local environment. However, I got this exception when I publish it to Azure Web App:
Then I found this article and did the same approach as the image shows:
However, it fails once the setting is applied.
The difference between the tutorial and my web app is that my one has a SSL certification to enable https connection. Do I need some extra management to make the web app get the connection string under this condition?
EDIT:
I saw #lolops's post and found there was a right coonection string in kudu environment. So I published it again... and it worked. It's odd and I don't know why the problem has been gone.
What I did specially was only restarting my PC. Could this be a solution? Anyway sorry for troubling.
Try visiting https://YOURPROJECT.scm.azurewebsites.net and find "Environment variables", search for your connection string and compare to the variable you use. It will be prefixed with the type of connection you chose (SQLAzure).
I have an azure cloud service with a couple worker roles, a WCF web role and a normal web role containing a couple aspx pages. Both roles are set to use https endpoints.
When testing locally in Visual studio using IIS the default.aspx page and the servicename.svc page both open in the browser. When I publish to azure though, the URL with the random string of characters opens the directory containing the service definition, but I can’t access the default.aspx page from that URL.
For example if my URL is randomstring.cloudapp.net after publishing, randomstring.cloudapp.net/wcfservice.svc works, but randomstring.cloudapp.net/default.aspx does not. I can get to the other page by using the IP address given in azure, but this isn’t really what I need. Furthermore, the cloud service URL does not work at all. mycloudservice.cloudapp.net results in webpage not found.
Do I need to do something special in order to get both the service, and the aspx pages to show up under mycloudservice.cloudapp.net? I can post the config files if need be, but as of right now, I don't think there relevant to the problem.
EDIT:
Just to clarify, I have now published to production, and the service is working [mycloudservice].cloudapp.net/[mywcfservice] and I can get to the website without a 404 error if I enter the port like [mycloudservice].cloudapp.net:8081/default.aspx . Is there a way to make everything show up under [mycloudservice].cloudapp.net/ without entering the port number so I can just type in [mycloudservice].cloudapp.net/[mywcfservice] AND [mycloudservice].cloudapp.net/default.aspx into the browser?
First, I guess you published your project to the stage slot of your cloud service. It's [Deployment ID].cloudapp.net. You will use the URL you specified if you deploy it to production slot.
Ref the problem, that '[randomstring].cloudapp.net/default.aspx' doesn't work, I'm not sure what you mean by 'doesn't work'. Is it 404 erroe? Or some asp.net runtime error. More information might be helpful.
Check the port numbers. Each of the endpoints (the wcf endpoint and the web endpoint) need to be on different port numbers. You'll need to access them as such when published to Azure.
The random-name issue is from publishing to Staging vs Production, as #Shaun pointed out.
I am having a problem with a small website that I am creating in visual studio 2008, using asp.net mvc 2, and the hosting server 1and1.co.uk. I have no database within the website yet, as it is a work in progress, just need the site up and running properly.
The problem is that I even after uploading the published website to the account on 1and1, I still get the error:
"error in '/' application"
Im not too sure if it is the web.config file or not. From what I have seen on some forums and websites I can not seem to sort this problem out.
Can someone please help me out with this problem
Many thanks.
Then its better to find out what you can run on your hosting, try first to run an empty web application without mvc and see if it runs.
I've done a significant amount of searching and am having difficulty finding people who have encountered a similar problem.
I have gone into the properties for my project and set it to use the local IIS web server instead of the VS Dev server. It created the virtual directory just fine. When I attempt to browse to the site, I receive the following error:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
I haven't done any custom routing rules for my project, so all of that is in its default state. The only other thing that I can think of is that there is something special that needs to be done to set up the "default" page for an MVC 2 deployment.
Any help would be greatly appreciated.
%windir%\Microsoft.NET\Framework64\v4.0.30128\aspnet_regiis.exe -ir
That solved it for me in the past. (remove the "64" if you're on 32-bit)