473,396 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

System.Web.HttpException: <path> is not a valid virtual path.

5
I developed a site using asp.net with vb script.In local machine its working fine..
But when deployed it shows the following error

its my code
filepath = Server.MapPath("http://www.mintmenadev.com/z/test/cms/Movies/" + FileUpload1.FileName)

FileUpload1.SaveAs(Server.MapPath(filepath))

it shows following error

System.Web.HttpException: 'http://www.mintmenadev.com/z/test/cms/Movies/RomanceMovieGeneric.flv' is not a valid virtual path.


pls help me.......
Jul 10 '08 #1
3 18592
Plater
7,872 Expert 4TB
Server.MapPath is for local filesystems only. An http:// url is not considered local.
For example:
Server.MapPath(@"\images")
might return
"C:\inetpub\wwwroot\images\"
Jul 10 '08 #2
Shinis
5
Server.MapPath is for local filesystems only. An http:// url is not considered local.
For example:
Server.MapPath(@"\images")
might return
"C:\inetpub\wwwroot\images\"
thank you for your reply..........
I tried this also "http://www.mintmenadev.com/z/test/cms/Movies/" & FileUpload1.FileName


But it shows an error

System.Web.HttpException: The SaveAs method is configured to require a rooted path, and the path 'http://www.mintmenadev.com/z/test/cms/Movies/head.swf' is not rooted.


pls help me.........
thanks in advance.........
Jul 13 '08 #3
Plater
7,872 Expert 4TB
That is the same thing. You are STILL using an http:// path. You need to provide a local path. Like the error message tells you.
Jul 14 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Haim Ashkenazi | last post by:
Hi I have to write a function that returns a list of all directories under <PATH> (should work on linux and windows). it should be easy to write a loop that goes through every directory... and...
6
by: gry | last post by:
I want to write some kind of install script for my python app that will add c:\cygwin\usr\bin to the system path. I don't want to walk around to 50 PC's and twiddle through the GUI to: My...
7
by: TLM | last post by:
I am trying to build a web application that will contain links to files on a users local computer. I am assuming that the files will be in a known location and can display in a browser window. ...
5
by: dpomt | last post by:
I have overwritten Application_Error in my GlobalAsax to handle errors. From time to time, I am getting exceptions I have never seen before (see below). What do this exceptions mean? Why are...
7
by: thisis | last post by:
Hi All, myGetImage.asp is suppose to create a temporary file in the client side, and display in on the client web browser. myGetImage.asp needs to know the clients web browser temporary...
10
by: Andrew Backer | last post by:
I have a few file:///c:/windows/somewhere style uris that I need to convert to the actual physical path. I am hoping there is a built in way to handle this. I know I can do some text replacing...
1
by: dryajov | last post by:
Hi I'm not sure if this should go here in the first place, this is more likely an ODBC driver issue. I'm having the strangest behavior when trying to do an insert into an access database from a...
5
by: Kyle Hayes | last post by:
Is there a way to use the 'r' in front of a variable instead of directly in front of a string? Or do I need to use a function to get all of the slashes automatically fixed? /thanks -Kyle
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.