Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think I might be a little late to this game, but if you're still having this issue, then I may have a solution for you:</p> <p>Cassini (the ASP.Net Development Server) can't serve SVG. The solution that worked for me (and consequently for my entire development team) was to get IIS running and configure the project to run using IIS as the server environment. (Another solution is to just use inline SVG data within the page content, but I don't recommend that; I find it messy.)</p> <p>That was the solution that was presented to me by various threads here on SO and one or two webpages here and there, the links to all of which I forgot to archive. Unfortunately, I also ran into authentication problems, and had to research a separate solution to that as well. Here's my compiled list of instructions that I sent out to my dev team (compacted a bit, with less detail, so as not to become a book):</p> <p><strong>Note:</strong> most of the following steps require either an administrative account on your local machine, or an Active Directory administrator account if you're on an AD domain (or ask the domain admin to give you local admin privileges &mdash; that's what I did).</p> <h2>Enable IIS and Windows Authentication</h2> <p><strong>Note:</strong> if this doesn't work for you, then you may need to install IIS from scratch.</p> <ol> <li>Go to Start > Control Panel > Programs and Features > Turn Windows Features on and Off</li> <li>In the feature list, check the box next to Internet Information Services, then expand the tree and navigate to Internet Information Services > World Wide Web Services > Security and check the box next to Windows Authentication. Click OK.</li> </ol> <h2>Configure IIS</h2> <ol> <li>Open the Start menu and enter "IIS" in the search box. Press Enter/Return to open it.</li> <li>Add a new site, making sure to use the correct application pool (my app was MVC, relying on .NET 4.0) and point the directory to the local directory where you store your copy of the project (I keep mine in C:\Projects\). Make sure you're pointing to the root folder of the web application, not the root folder of the project (the correct folder will directly contain your Models/Views/Controllers folders if you're using MVC). Give the site a port number (just make something up, something memorable, but don't use "80" if you plan on testing multiple projects on this machine at the same time). Click OK.</li> <li>In the configuration pane for the main server at the top of the tree, select MIME types and make sure that there is an entry in the list that looks like ".svg" | "image/svg+xml" &mdash; add it yourself if it's not there.</li> <li>In the configuration pane for your new website, select Authentication. <em>Disable</em> all forms of authentication except for "Windows Authentication" &mdash; <em>enable</em> that one.</li> </ol> <p><strong>Note:</strong> if the ASP.NET v4.0 application pool is not in the list in step 2, follow these contingency steps:</p> <h2>Application Pool Contingency</h2> <p><strong>Note:</strong> these steps are only for use in case ASP.NET v4.0 is not an option when selecting an Application Pool in IIS Manager.</p> <ol> <li>Open a command terminal.</li> <li>Type <code>cd C:\Windows\Microsoft.NET\Framework64</code> (the Framework64 folder name may be different, so you may need to just look around the <code>C:\Windows\Microsoft.NET</code> directory to find it). Press Enter/Return.</li> <li>Type <code>dir</code> to list the contents of this folder. Look for a folder name like <code>v4.0.30319</code> and <code>cd</code> into it.</li> <li>Type <code>aspnet_regiis -ir</code>. Press Enter/Return.</li> <li>Once it does its thing, close the terminal window and close/reopen IIS Manager, then go enable "Windows Authentication" again.</li> </ol> <p>Now, to preview your website, configure the VS2010 project to point to <code>http://localhost:&lt;port&gt;</code> where <code>&lt;port&gt;</code> is the port number you entered in step 2 of <strong>Configure IIS</strong>. You also need to configure the project for Windows Authentication as well.</p> <hr> <p>Please note that these instructions have only been personally tested on Windows 7 Enterprise edition with IIS 7.5. Even if your environment is identical to mine, your application may not be, and therefore you will likely need to modify a few of my steps.</p> <p>I hope I've been helpful and not redundant here. I thought I might just compile all the steps together in one place, rather than just hand you a bunch of links and say "good luck." If you (or anyone) would prefer further detail on the steps above, I can be more explicit; I'm just assuming a certain level of familiarity with Windows, IIS, and Visual Studio.</p> <p>If I find the links I mentioned above, I will edit this post and include them.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload