views:

34

answers:

1

I've got problems when I deployed my mvc website with IIS 7.5.

On my solution in VS 2008, I published web to an specified folder. Then I go IIS version 7.5 create a virtual directory to my published folder then convert it to web application.

When I run it http://localhost/myMVC my flash can't specified file , when I type http://localhost/myMVC/ it's run properly. But I don't really understand that I have to use path in my flash

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                                codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,24"
                        width="980" height="421">
                          **<param name="movie" value="Content/Skin/flash/header_v8.swf" />**
                          <param name="quality" value="high" />
                          <param name="menu" value="false" />

instead **<param name="movie" value="/Content/Skin/flash/header_v8.swf" />**.

For FCK editor, I've already configured correctly on my web.config when I run on VS 2008 http://localhost:portnumber/home/cms/

 <appSettings>
    <add key="FCKBasePath" value="/Content/FCK/" />
    <add key="FCKUserFilesPath" value="/Content/UserFiles/" />
  </appSettings>

But when I published on IIS 7.5 it wasn't understand the physical path that I was configured.

Could anybody help me?

Thanks in advance.

A: 

After 2 days, I've found my solution. My problem is the physical path when I hosted on the server. When I run my mvc application on VS 2008 (http://localhost:portnumber/, I run at root path "/". I've made mistake when I published and hosted on web server using virtual directory "/myMVC/". So every images, flashs, fckeditor configuration were linked to wrong resources. Ex:

For the root path "/": <img src='/content/a.gif' alt=''/>

For the virtual directory "/myMVC": <img src="/myMVC/content/a.gif" alt=''/>

Then solutions is <img="<%=Url.Content("~/content/a.gif")%>" alt='' />

I've changed all links in my mvc app. It work great.

For publishing and hosting, If using the default root for IIS c:\inetpub\wwwroot\ we don't need to change. Otherwise,Configuration IIS with the virtual directory should be using Url.Content() link to resources.

Please suggest me another solutions. Thanks in advance.

nvtthang