I ran into the following common error when trying to run my ASP.NET MVC 4 website:
d:\temp\2pirqzul.5yz\temp\root\898a687c\8681620c\App_Web_jfuizczv.0.cs(27): error CS0234: The type or namespace name 'Models' does not exist in the namespace 'DealBoxy' (are you missing an assembly reference?)
While normally a straightforward error, this one was confusing, because I was certain that I had referenced the
DealBoxy project correctly.
It turns out that DealBoxy was compiling to an exe, and apparently ASP.NET won’t load exes the same way it will dlls. Changing the Output type to Class Library in the Application tab of the project settings did the trick.
In order to use RestSharp with the async/await keywords, the methods must return
Task objects. Since this isn’t provided out of the box, some simple wrappers will do the trick:
Once you have configured an Azure web role with an SSL certificate and setup the port configuration in the Azure project, you may want to redirect anyone who comes to the http:// version of your page to the secured https:// version. To do so in production, add the following to your Web.Release.config: