Unable to access page ashx - visual-studio

I have to test a Web Service with visual studio 2015, using IIS.
I have a project "MyWebService", this project contains a page "myPage.ashx". When I start the project my chrome explorer starts on page localhost - /. There I can see all file in the project.
But when I click on myPage.ashx I got an error 404 :
HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
I changed the property "browse to URL" to ~/myPage.ashx but there is no difference. I'm very new to web services and I need help to know where I have to looking for.

.ashx file extension might not be defined in your IIS.
See official documentation on Microsoft site How to: Configure an HTTP Handler Extension in IIS.

Related

Index.html file generated by apidoc.js shows a 404 error after deploying asp.net web api app to server

I used apidocjs to setup the documentation of my asp.net web api app. Everything works fine on my machine when I run my web api in visual studio but not on the server I deployed the app to.
I get a 404 error when I navigate to the index.html generated by apidocjs.
I think it's an issue with IIS.
I need suggestions on how to resolve this?
Ok. Found the problem kind of silly.
I did not include the ~ symbol as part of the path in my anchor tag.
Before I had
I added ~
<li>Docs</li>
<li>Docs</li>
and problem solved!!!
Update.
What I did earlier solved the problem on the deployment i did to my local IIS but not on my remote server.
I had move my static html file into the Content folder of my web-api, edited the link to look like this and the problem was resolved.
Docs
Got this from here. Ordinary html links in mvc razor

Http 404 error after publishing a web application onto web server

I have a web application which is working good on my local system. I have used Visual studio one-click publish method to deploy it to the server. The publish shows successful but when I try to browse the web site with http:\servername\application, it is giving me HTTP 404 web page not found error message.
Is it any type of setting in IIS that I am missing or please let me know how can I fix this and make the application run from the server.
Thanks.
Try giving the .aspx or .html page which ever you are using as default page..after the url you have given..and see if the problem is still there

Visual Studio Local IIS Web Server Project Url With Multiple Subdomains

I would like to try testing virtual hosting of an ASP.Net MVC website on my local machine. In Visual Studio in the Web tab of the properties file for the MVC project, I selected Use Local IIS Web Server. By "virtual hosting", what I really mean is that I'm trying to make sure that pages load correctly for urls of the form http://sub-domain-i.my-domain.com/MyMvcProject/Controller/Action, where I'm hoping to test multiple subdomains in place of sub-domain-i. In production, everything will be running under a single IP address on one server. I also hope to test https for urls of this form using a wildcard ssl certificate, but currently I'm having trouble configuring Visual Studio to just test regular http. Prior to worrying about sub-domains, the Project Url field in the Web tab of the properties folder for my MVC project said "http://localhost/MyMvcProject", and everything worked fine. However, after changing this to "http://sub-domain-1.my-domain.com/MyMvcProject" and then adding the following line into my C:\Windows\System32\drivers\etc\hosts file,
127.0.0.1 sub-domain-1.my-domain.com
Visual Studio produces the error "Unable to create the virtual directory. http://sub-domain-1.my-domain.com/MyMvcProject". Does anyone know what I might be doing wrong?
Many thanks in advance!
Edit: I've just discovered that if I select Use Custom Web Server instead of Use Local IIS Web server, it works and I don't get the popup error from Visual Studio. I'm still not sure why this solution works, though, or what I was doing wrong by selecting Use Custom Web Server...
A little late, but I hope it helps somebody.
You need to create the binding in the IIS website prior to add it to the project url of the project. That binding must be like
http | sub-domain-1.my-domain.com | 80 | * or 127.0.0.1
How to create a binding

Webform in MVC app does not show in IIS7.5

I have a webform (using the ReportViewer) that is in an MVC application. It is outside the Views folder in a root level folder called Reports. The webform page works correctly when using VS2010 and the web server (Development Server, WebDev.WebServer, Cassini). When using IIS7.5 with an integrated Application Pool (also tried Classic and set the ISAPI restrictions to allow), it does not work. I have the modules..handlers item (Reserved-ReportViewerWebControl-axd) in web.config.
I am getting this page result: "The resource cannot be found." / Description: HTTP 404. The resource you are looking for ...
I hope someone has a fix for this.
Thanks in advance.
Try putting the file(s) under the content folder. That should remove any route problems.

Umbraco server error after install

I downloaded umbraco and used the web platform installer. Everything went though okay and it installed SQL Express 2008 and a new directory under the default website in IIS. However when I launch the website I'm redirected a dead page as below.
What do I do next?
Thanks!!
http://localhost/install/default.aspx?redir=true&url=/test1/default.aspx
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /install/default.aspx
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
Umbraco must be installed as a root website, It cannot be installed as a sub directory or virtual directory under a website.
There are plans to support this in future although I'm not sure if a date has been given.
For more info see this post on our.umbraco.org
In the install wizard.
When you are asked to type in new web application and web site name, just leave them empty.
See this install guide
http://www.youtube.com/watch?v=wEeC4Bd-QZg
I just made a fresh and plain installing with the follow requisites and solved this problem:
Add and configured the website in IIS port 80
Pointed physical path to wwwroot
Configured the authentication
Unziped the Umbraco files in the root of server (wwwroot)
This solved but I don't exactly why.

Resources