26/04/2016 - 1 minute read
Reconfigure a Project to Use IIS Express in Visual Studio
Apparently, back in the day, they had enough spare RAM on their development machines to run a full copy of IIS.
We're not so privileged today, but if you inherit one of these projects, you may end up looking at error messages like this:
MyProject.csproj : error : The Web Application Project MyProject is configured to use IIS. Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.
Or this:
MyProject.csproj : error : The Web Application Project MyProject is configured to use IIS. The Web server 'http://www.myproject.local/' could not be found.
Because on your weedy i7 CPU, bogged down by too many background processes, you've opted not to install a full copy of IIS and use IIS Express instead.
Projects that are configured to use IIS won't even load on machines that don't have it installed, but fortunately, it's easy to open up the XML in the csproj
file and make the changes that you need to reconfigure the project to use IIS Express instead.
First, you'll need to add the UseIISExpress
property and set to true
in the first PropertyGroup
in your csproj
.
<UseIISExpress>true</UseIISExpress>
Then, under Project Extensions -> VisualStudio -> FlavorProperties -> WebProjectProperties
, make the following changes.
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>3000</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:3000</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
Clicking 'reload project' in your solution explorer will now load the project for you. Of course, you can change the port number to anything you want (just make sure that they match under both DevelopmentServerPort
and IISUrl
)
About the author
Gary Lewis Cheetham is an automotive marketing specialist, born and raised in Oldham, Greater Manchester. He spent his teenage years working at the family dealership after school, learning the ropes of the car trade from the inside out.
After moving on to working in marketing, Gary Lewis founded GL Digital in 2020 when he noticed a need for direct-to-consumer marketing platforms within the auto industry. He now strives every day to help independent dealers in the UK and US realise their potential. Gary also loves Formula 1 and motorsport.
More Articles
SEO For Car Dealerships: Everything You Need to Know
We will be the first to say it: SEO for car dealerships is officially over in 2022. Car dealers fail at SEO time and time again, because…
5 minute read - 07/02/2022
Everything you need to know about Conversion Rate Optimisation for Car dealerships in 2022
This article will cover how dealerships can do conversion rate optimisation on their website and sales funnels, including for lead…
6 minute read - 27/01/2022
How to run successful Email Marketing for Car Dealerships in 2022
Email marketing is one of the most effective digital marketing strategies for car dealerships to build relationships with customers. It…
5 minute read - 27/01/2022