Embeded Flash in ASP.NET page iis 7.5 local flash file - asp.net

I'm trying to add Embeded flash in aspx page running on iis 7.5 windows server 2008.
When i'm adding the Embeded code src=/mylocation/test.swf it works fine.
But when I'm adding fileserver location src="file:\\c:\test.swf the page doesn't load.
The code works fine in normal html file on my desktop.
What should I do?
Thanks,
Alex

You should have that file inside your web site and use a relative path to reach it. IIS can then reach the file.

Related

PdfHanlder.ashx working on IIS Express , but not working on IIS Production Server

I have developed an ASHX file that outputs a PDF.Everything works wonderful when I debug it on Visual Studio. If I enter the url directly from the browser it is working fine. It downloads PDF.
I have a Default.aspx that shows the PDF (from the ASHX url ) in an object html control(thats the one i am interested in)
The problems becomes when I publish the app to a virtual directory on IIS Production Environment. No PDF is loaded in Default.aspx , but if I enter the ashx url directly in the browser it downloads the PDF correctly.
What i am doing wrong? I am using IIS 5.1
Thanks in advance
It was not fault of ASHX,the html object was referencing a bad URL for the PDF.
In Local server the URL was
http://localhost/PdfHanlder.ashx?Id=101&.pdf
But in server it was deployed to a site "Testing"
so the url was
http://server/Testing/PdfHanlder.ashx?Id=101&.pdf
I was referencing the pdf inside the from
- http://server/PdfHanlder.ashx?Id=101&.pdf
So i missed the /Testing prefix...once it gets fixed it started to works.

Source Code shows for ASP.NET web page

I have a simple .aspx file that I want to run in my browser. I have installed IIS, along with all ASP.NET features, on my local machine. I am using USBWEBSERVER as a server to display my web pages.
When I put in the path of the file of my of web page (.aspx file), just like I do with all my PHP pages, I get the source code (instead of the GUI).
How can I set this up so .aspx pages will work on my machine?
I think you have to get a web server that supports ASP.NET. Right now, there's IIS Express, which is free and can host a multitude of technologies:
http://www.microsoft.com/en-us/download/details.aspx?id=1038

IIS 7.5 doesn't open aspx, html pages

I have two ASP.NET sites on my IIS 7 (Windows Server 2008 R2)
First one works perfect, it opens default.aspx page any other aspx pages as well as html, but second site doesn't open neither .aspx nor .html links, so for example if I try to open http://mysite.com/Default.aspx url, it just shows an empty page without any content or any error.
What it could be?
Thanks.
Well, many things can be broken.
Few tips:
Start Chrome, Firefox (with Firebug addon) or Fiddler or any other http proxy and check what the server is sending - is it HTTP 200, 404, something else?
check IIS logs c:\inetpub\logs\Logfiles\w3svc
check EventLog
compare httpmodules in working website with those of the website which is not working
ensure correct app pool with correct .net version is set for site
try to convert website to webapp
if all fails, delete website and create it from scratch. If it works it may suggest that IIS metabase was damaged.
Another workaround that I suggest:
Open the "hosts" file using Notepad in C:\Windows\System32\Drivers\etc\hosts
then add
127.0.0.1 YourWebsite
Next, try to add binding to a site as suggested here at (http://technet.microsoft.com/en-us/library/cc731692%28v=WS.10%29.aspx)
I hope it helps you.

~ character in master page URL

I am developing an ASP.NET application using a masterpage.
As default the master page is referred on top of all the pages as
masterpagefile="~/mymasterpage.Master".
My application works perfectly in the test environments under IIS 6.0 or 7.0
When I publish it to the server (under IIS 6.0 - for which I don't know the server configuration) it gives me an error for the master page URL.
When I remove the "~/" from all the pages it works perfectly but I would like to know the reason and also how can I change the configuration to make it work even with the following URL : "~/mymasterpage.Master"
Thanks
I found the problem; actually "~/" refers to application root and my application was inside a virtual directory instead of an application. I just converted the virtual directory to an application and it's working fine !

Html code shows when browse the home.aspx

I have windows server 2008 R2 and IIS 7 to host the website. When I create the virtual directory and set the default document say Home.aspx and host the site. When I browse the page it shows the home page's html code. I have test this many times but same issue. Any thing wrong in my code aur any issue in hosting the site. Pls do the needfull.
Thanks
Dinesh Kumar
Looks like IIS is not setup to use .NET.
You can install .NET on IIS by going to the framework directory of the version you are using (%WINDIR%\Microsoft.NET\Framework\v.XXXXXX) and executing aspnet_regiis.exe.

Resources