I'm having some troubles trying to find out what to do:
I published a directory with some .aspx pages on IIS on :8081 :
image - localhost:8081
But when i click on a page or try typing it, i get an http 404 :
http 404 - image
Maybe some IIS configurations, but i cant find it anywhere, if someone could help me i would really appreciate! Thank you all!
You can setup your bindings by following the instructions in this post:
How to access multiple website using different bindings on IIS 7.5
Also, IIS Express will assign a random port when debugging, and this will not work when the app is actually published.
Related
I have recently published my C# .net core Angular 2 web application to an IIS Server. However, the Web Api that I am calling is not working correctly. When I call the Api, a file is supposed to download however, the file does not render correctly.
I am sure that the api is being called as I am not getting a 404 error. When I run the project on my localhost, it works fine, but on the live site it is not working.
One more thing, when I enter information that should normally cause an error in the web api, it is not throwing me an error like it does in the localhost. It is as if the api is failing but when it is published to IIS it doesn't recognize the error in the angular observable. If anyone has any ideas on why this is happening or how I can debug this it would be appreciated. Thanks
Please run the WebApi from IIS individually and check the error.
Please check the file size while downloading because you need to
configure in webconfig file, if exceed default configuration.
Please check in Angular you have subscribe to that observable.
If you can give more details on this. It can help us to provide
more information like specific error and so on.....
I'm trying to test my application against the OAuth Microsoft Account Login.
I have added the following to my hosts file
127.0.0.1 testdomain.co.uk
My application is running over https so when I run the app it runs as follows;
https://localhost:44308/home
Now when I hack the url to be
https://testdomain.co.uk:44308/home
I get the certificate warning (which is to be expected). However, when I click continue to site, i get a 400 Web Page cannot be found error?
Any ideas on what i am doing wrong here?
You need to tell your web server that it should handle the testdomain.co.uk for this project. Your web server (IIS Express) does not know it, as by default it is set to handle "localhost" host only. How to change that is described here: https://stackoverflow.com/a/32365556/3835864
I'm stuck on the dreaded "it works locally" issue.
I have used NuGet to install the WcfWebApi into an Azure WebRole.
This is a WebForms website.
Global.asax.cs Application_Start calls RegisterRoutes().
RegisterRoutes() contains:RouteTable.Routes.Add(new ServiceRoute("MySvc/TheService/", new WebServiceHostFactory(), typeof(Services.TheService)));
The Service's Interface contains:
[OperationContract]
[WebGet(UriTemplate = "/hello", BodyStyle = WebMessageBodyStyle.Bare)]
string Hello();
The implementing class just returns "hello", so if I now navigate to: http://localhost:49831/MySvc/TheService/hello - i get "hello" returned. OK.
If I now publish to Azure and try the same url (obviously with xx.cloudapp.net/ etc) I always get a 404.
I have used the WcfWebApi before in the past - but always in a WCfWebRole. Does this make a difference? Why does it work locally? It must be something to do with Azure then?
Any advise appreciated. Thanks.
Edit: well, as per #Rajesh's suggestion I ran Get_HostedServices, which listed the hosted-services urls, eg: https://management.core.windows.net/mysubscriptionId/services/hostedservices/the-nameOfTheApp. Not really sure where this is going...
In utter desperation I added a .svc file to a folder in my web app, plus all the (horrible) system.serviceModel services and so on that one needs for REST style configuration. This all works.
I don't want to close this question though as it's not been answered as such and I am curious as to what has happened. Thanks everyone for responses so far. If I do find an answer I'll update.
I thought about your issue, Could you try to run your app locally using IIS or IIS Express? (IIS express isn't available out of the box, you must install it, but is easier to use with VS)
The url you provided lead me to think that VS uses either Cassini (Visual Studio Development Server) or IIS express. Be aware that Cassini doesn't work exactly as IIS, whereas IIS Express does. Your Azure web role will run under IIS, which could explain the different behaviors you are experiencing.
Furthermore your url doesn't look like a Windows Azure emulator url (the domain should be something like 127.0.0.1:81 .
I suppose your project is a windows azure project. When testing, are you sure you are starting the Azure project and NOT the web application project?
I am having this strange problem:
I have just developed a WCF service (on VS2008) and created a website (ASP.net) to use that service. When I launch the website from VS2008, it works fine and I get the "You have created a service method", but if I try to open that service using IIS then it is not able to load the website at all. I get a message that "website found, waiting for reply", but the browser is not able to load the service at all.
Any help will be greatly appreciated!
There was problem with my IIS 7.5, in that ASP.NET was not registered for IIS. The following article was helpful: http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx
I used aspnet_"regiis -i" command and the websites started loading. Thanks for all the help guys!
A few troubleshooting items
Make sure in inetmgr under Web Services Extension that the required frameworks are unblocked.
Enable tracing to watch the messages
Enable exception details in faults
Make sure you are running the website under correct framework (under website properties)
In web.config, clear and add handler svc-Integrated-4.0
This is a similar question as IIS 7.5, Web Service and HTTP 405 error but a little different. Instead of a WCF web service, I've got an MVC2 web service that returns a 405 error when a PUT is used in the request. And, in my case, POST works just fine.
I'm guessing I need to either add or tweak an IIS 7 Handler Mapping to get PUT to work but my hosting provider hasn't been much help. Anyone out there run into this and know how to get PUTs to work in an MVC2 web service running in IIS 7? My apologies if this has already been answered, I've been searching all day and haven't found the magical answer.
Any help would be greatly appreciated...
We had the same problem, and the solution was adding an element into section in the Web.config file:
<remove name="WebDAVModule"/>
Have a look at https://serverfault.com/questions/93424/how-to-enable-put-and-delete-in-iis7/93428#93428
dario-solera:
You can take a look at the "Handlers
Mappings" sections at either the
server or site level (IIS group).
Select a mapping for an extension
(e.g. .aspx) and select "Edit" from
the context menu. The "Verbs" tab
allows you to specify verbs to accept.