url rewrite with visual studio 2012 - visual-studio-2012

I'm trying to use the url rewrite module with an MVC application on VS 2012.
I've installed the module using web platform 4.0, followed Ruslan's blog post, updated his js script according to the comments (specifically the last one by Brant Burnett on Oct 19th, and the script executed successfully. I checked the DotNetConfig.xsd and everything looks fine.
If I open IIS management console I see the Url Rewrite module and everything looks ok.
I create an simple MVC solution (with the default home/account controller), and when I add the simplest ToLowerCase rule (also copied from Ruslan's blog), I get the blue squiggly line under the tag and an http 500.19 if I try to execute. rebooting, etc. does not help. also important to mention I use IIS express 7.5.
the same procedure worked for me fine on a machine running VS 2010, url rewriting worked without a problem.
anyone knows what could go wrong? what info is needed for further analysis? why isn't intellisense working and the rewrite module recognized?

The problem lies in version of .NET Framework, each version has its own config intellisense file. Additional hassle is that the file for 4.5 isn't in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Xml\Schemas\, as DotNetConfig45.xsd, but in additional folder 1033.
Here I updated RuslanY's setup script for VS 2012 and .NET 3.5, 4.0 and 4.5:
http://pastebin.com/8GGGHTBL

Related

Attempting to install NuGet server on iis 10 on w2016 yields 404 not found error

My environment:
Windows 10 Creator (1703 with current updates to this date)
Visual Studio 2017, Enterprise, 15.3 with most of the goodies turned on.
Windows 2016, again with all current updates.
iis 10 with WebDeploy installed (that's a whole other installation nightmare, suffice it to say that SO helped there and the answers are already out there so I won't go into it here). Turned on ASP.NET 4.6, otherwise mainly accepted the defaults.
My process:
As per the NuGet.Server documentation, create a new ASP.NET MVC project using the "Empty" template and download and install NuGet.Server as specified. I'm using .NET 4.7 as my framework.
Compile and configure as desired (at least ensure you have an api key in place).
Deploy to iis using the "Publish" | Web Deploy option
Try to get in touch with the NuGet.Server on the website and fail miserably!
My bindings are 192.168.1.25 (yes, the server has a fixed IP address), port 80. The name of the site is AWENuGet and the desired url is www.awenuget.com.
To be sure, all of this works just fine if you take the same project as described above, assign a local port number (creating the project will do that anyway) and then simply running the application in Visual Studio works just fine.
But, when I took that self-same project and simply deployed it to iis, miserable failure.
I tried to open the host file (Windows\System 32\drivers\etc) and added the following:
192.168.1.25 www.awenuget.com
to said file and it still failed.
...and the answer, for me, was to take that same hosts file entry that I made on the server so that the server could see it and install it in my dev machine's hosts file and voila! NOW it works just fine.

IIS does not start .net core 1.0 executable

so after .net core 1.0 got published I started a new console project and imported the code from a small prototype that is supposed to run without IIS. Besides having to use net46 in my project.json due the not-yet updated MongoDB.Driver, that worked fine. When I build the app in Visual Studio a small App.exe with a lot of dll is build and can be run fine locally without IIS.
I then noticed the option to build for IIS Express and thought that I can use the IIS on our server (IIS 6.2, Windows Server 2012 R2) too. It publishes fine with WebDeploy, but nothing happens after that. I was following this official guide. I installed the .NET core Windows Server Hosting bundle and everything appears to be in order, but when I browse to the url, I get a ERR_NAME_NOT_RESOLVED. Theapp.exedoes not appear in the Task Manager and I can't find any log file, although it is enabled in theweb.config. I can execute the app manually, but then it only listens on the defaultlocalhost:5000` address.
If I understood it correctly, the IIS is supposed to act as a reverse-proxy to the dotnet tool which starts a dll, but in my case it's already a compiled exe that works standalone. But I can't figure out how to build a dll from this app..
What am I doing wrong?
If you target full .NET Framework the application will be .exe and not .dll and it is fine. ERR_NAME_NOT_RESOLVED indicates that the url you provided in your browser could not be resolved and the request to the application was not made. AspNet Core Module starts the application on the first request and because the host could not be resolved the request was not made and the application was not started. Once you figure out why the name could not be resolved and you still have issues with making your application work with IIS take a look at my post which explains how things work and how to troubleshoot issues. This, however, only applies after the request can reach your application.

Period in ServiceStack Routes works in IIS6.0 but not in Dev server?

I am using service stack and I need to have periods included in my routing for example to indicate a version number, eg
/Model/v1.0/Save
When I deploy the service onto IIS6 it works perfectly, however when i run it locally through Visual Studio I get an error of
Request handler not found.
If I remove the period then it works!!
I have looked through all the questions and there was a similiar one,
ServiceStack Handler Not Found When Periods Present in Path
BUT the answer implies that it cant be done and I have seen it working. Secondly in the link referenced in the answer the Service Stack rest tests seem to show that a Version number with a period is a valid route??
See here
https://github.com/ServiceStack/ServiceStack/blob/master/tests/ServiceStack.ServiceHost.Tests/RestPathTests.cs#L210
Please can someone give me some guidance on this one!
Thanks
I just answered this similar question, and i think the same should apply in this case: Visual Studio Development Server (Cassini) does incorrect routing for dots.
If you create a file system Web site in Visual Studio 2010 and the Web site is in a folder that contains a dot (.) in the folder name, URL routing will not work reliably. An HTTP 404 error is returned from some virtual paths. This occurs because Visual Studio 2010 launches the Visual Studio Development Server (Cassini) using an incorrect path for the root virtual directory.
There are 3 workarounds, and only the "use IIS instead of Cassini" workaround seems to work for ServiceStack.
The problem will go away if you edit your project Web properties and check "Use IIS Express" instead of "Visual Studio Development Server".
The cases to use IIS Express are explained in the announcement, and there is a download link.

UrlRewrite breaks Visual Studio 2012 Debugger

I get the following error when I try to launch the debugger in visual studio for a website project:
Unable to start debugging on the web server.
Help Info
I have traced the problem to a tag not being recognized in the web.config file (it has a squiggly line underneath) called 'rewrite'
This is used by the URL Rewrite v2.0 module.
If I comment out the rewrite rules the debugger works perfectly.
Searching online brings up users of VS2010 with the same problem with previous versions on the ReWrite module.
The fix seems to be to downloading a file written by someone in 2009 visual-studio-xml-intellisense-for-url-rewrite-1-1
Considering that file is 4 years old and we are now using VS2012 and ReWrite v2.0 I am reluctant to use it!
Does anybody know of another fix other than having to comment out the web.config section every time we want to debug?
Shame on Microsoft for still not fixing this!!!!
This issue has been resolved in Visual Studio 2013
Yippie!

Windows Platform Installer fails during Orchard installation

I'm attempting to install Orchard 1.0 on a Windows 7 box. It has only just been released. I downloaded and installed the Windows Platform Installer and attempted to install Orchard. The error message is that the application has stopped working and asks if I want to debug or close the application.
The event log contains a single error:
The event logging service encountered an error while processing an incoming event published from Microsoft-Windows-Security-Auditing.
I tried installing MVC3 and it worked without any issues.
Has anyone experienced a similar problem?
I have exactly the same problem on a Windows 7 and a Windows Vista SP2 system.
MVC3 installs without problems and works just fine. Orchard CMS crashes WPI.
Get the Orchard ZIP file from their site, extract it and open the solution in Visual Studio 2010 or WebMatrix or VS Express and try to run it. You can also run it directly from the folder you extracted it to by using IIS Express.
The installation through Web Platform Installer is broken and it won't work.
I believe I have located the answer on the Orchard CMS Discussion tab on Codeplex.
http://orchard.codeplex.com/Thread/View.aspx?ThreadId=241684
The installation script was missing a reference to a library. They have now rectified this and have advised that you need to delete the AppData folder.
C:\Users\YourUserName\AppData\Local\Microsoft\Web Platform Installer
Once I did this the WPI orchard cms installation worked.

Resources