Problem while accessing your DotNetNuke site from outside the localhost running on IIS Express [WebMatrix]

The Good Thing

First of all I would like to share my experience with DotNetNuke, which has been nothing but great. It took me hardly 15 days to learn DNN, create an site in it and upload it to a remote server from where it can be accessed publicly.

I must also add that my requirement was pretty simple hence there was no need for me to create a module in it instead, I used the available modules along with some free modules from CodePlex.


The Website was running perfectly in my localhost. Here, I would like to add that I was running the site in IIS Express (Web Matrix 2).

So to upload the site to the server, I followed the standard procedure, i.e, I took the backup of the database, which I restored on the server, then I copied all the DNN files from my local computer up to the server.

Now, I could access my site from within the server, but when I tried to access from an outside environment, I got this error, BAD REQUEST 

After googling a bit I found that I needed to add a site alias (port alias) to my site in Site Settings under Host. In the alias, I needed to add a new alias replacing the localhost with server’s IP address.


I thought that would solve my problem, unfortunately, that was not to be. I was still getting the same error. Eventually, I saw that though adding a port alias was compulsory as otherwise the site will not be accessed by that url, along with that I also had to modify the url in my Web Matrix (ver 2) under Settings replacing the localhost part with the server’s IP address.

I guess my Web Matrix was refusing any request with url other that localhost. Once I added the server’s IP address in place of localhost, my site became accessible publicly.

One more you also need to run  the WebMatrix in the administrator mode otherwise you may get a URL Binding Error if you try to modify the localhost. [Win 7+]



2 thoughts on “Problem while accessing your DotNetNuke site from outside the localhost running on IIS Express [WebMatrix]

  1. Clinton Moment December 11, 2016 / 13:07

    This design is wicked! You definitely know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Excellent job. I really loved what you had to say, and more than that, how you presented it. Too cool!


    • Piyush December 11, 2016 / 21:27

      Glad to know that you liked it. 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.