How to use subdomains with localhost on IISExpress?

This can be accomplished by editing the applicationHost.config file C:\Users\yourProfile\Documents\IISExpress\config\applicationHost.config Visual Studio usually handles editing this file for you when you make configuration changes, but you can manually edit. Find the particular site you are working with and the following bindings should work: <bindings> <binding protocol=”http” bindingInformation=”*:5252:localhost” /> <binding protocol=”http” bindingInformation=”*:5252:contoso.localhost” /> </bindings> You can … Read more

How to get base URL of an MVC application using javascript

You should avoid doing such detection in JavaScript and instead pass the value from the .NET code. You will always risk running into problems with urls like http://server/MyApp/MyApp/action where you cannot know which is the name of a controller and which the path to the application. In your Layout.cshtml file (or wherever you need it) … Read more

Separate application pools for ASP.net applications in IIS

Reposted from ServerFault, “Why add additional application pools in IIS?” AppPools can run as different identities, so you can restrict permissions this way. You can assign a different identity to each app pool so that when you run task manager, you know which w3wp.exe is which. You can recycle/restart one app pool without affecting the … Read more

WCF using computer name instead of domain name when viewing MyService.svc?wsdl

WCF 4.0 has solved this issue in some instances with a new config option that use Request Headers: <behaviors> <serviceBehaviors> <behavior name=”AutoVaultUploadBehavior”> <useRequestHeadersForMetadataAddress> <defaultPorts> <add scheme=”https” port=”443″ /> </defaultPorts> </useRequestHeadersForMetadataAddress>

IIS HTTP Error 500.19

This issue took me the best part of a day to figure out, as I had the exact same code working on another machine in the office. It turns out that I was missing some features in IIS, and that the web.config I had carried down was looking for these features. I was missing both … Read more

Cannot start IIS Express

For me this problem was due to a misconfiguration in the project which manifested itself in IISExpress’ applicationHost.config file. I had both the http and https ports setup as the same. <site name=”{projectname}” id=”3″> <application path=”https://stackoverflow.com/” applicationPool=”Clr4IntegratedAppPool”> <virtualDirectory path=”https://stackoverflow.com/” physicalPath=”{myPath}” /> </application> <bindings> <binding protocol=”https” bindingInformation=”*:57287:localhost” /> <binding protocol=”http” bindingInformation=”*:57287:localhost” /> </bindings> </site> To solve … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)