|
Got an error when i deployed not a valid virtual path. though i have added permissions to image folder on the server.
Iam using a function that returns save location and uploads the image. this is the code iam using:
Private Function Uploaded() As String
Dim filePath As String = AppSettings("~\Images")
Dim SaveLocation As String = String.Empty
If Not txtImgURL.Text.Length = 0 And Left(txtImgURL.Text, filePath.Length) <> filePath Then
Dim fileName As String = System.IO.Path.GetFileNameWithoutExtension(txtImgURL.Text).ToLower()
Dim fileExtention As String = System.IO.Path.GetExtension(txtImgURL.Text).ToLower()
SaveLocation = System.IO.Path.Combine(filePath, fileName & fileExtention)
Dim physicalLocation As String = Server.MapPath(SaveLocation)
If File.Exists(physicalLocation) = True Then
Dim sequencer As Integer = 1
SaveLocation = System.IO.Path.Combine(filePath, fileName & "_" & sequencer.ToString & fileExtention)
physicalLocation = Server.MapPath(SaveLocation)
Try
My.Computer.FileSystem.CopyFile(txtImgURL.Text, physicalLocation)
Catch
My.Computer.FileSystem.CopyFile(Server.MapPath(txtImgURL.Text), physicalLocation)
End Try
Else
Try
My.Computer.FileSystem.CopyFile(txtImgURL.Text, physicalLocation)
Catch
My.Computer.FileSystem.CopyFile(Server.MapPath(txtImgURL.Text), physicalLocation)
End Try
End If
End If
Return SaveLocation
End Function
Any help?
|
|
|
|
|
to which user you added the rights?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
i have added on folder images, the strange thing happening is that i can update an image already found but cant add a new image.
|
|
|
|
|
which user and which rigths are added to the directory?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
I have added to the directory aspnet user with full control and network service with full control.
|
|
|
|
|
that should be sufficient. The folder one level higher has both users with the rights? (back up to the root?)
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
is this folder somewhere within the wwwroot or have you placed outside wwwroot folder
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
I have tried both inside and outside but now it is inside
|
|
|
|
|
has wwwroot full control for asp_net user and network_Service ?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
|
well, that makes it a curious case.
I believe that if you pick Full Control you could still set some other options if you pick the Edit button.
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Hi Everyone,
Can anyone explain me about how the process takes place behind the restful webservice.
Ex: http://www.myservice.com/employee/1234
with this object how can we do all the [ADD,UPDATE] transactions. How does it differenciate, I am not clear on this.however for DELETE & Search we need only employee id.
Thanks in Advance.
Regards,
Manowj
|
|
|
|
|
Hello Friends,
I'm working on a Property site. In that site i've no. of cities like Delhi,Mumbai,Chennai and etc. and it will be around 15-20 cities
Now i've to display property accordingly the city. For it i've taken only one page which is dynamically brings the properties according cities name. But my question is is it okay to have a single page and bringing the data dynamically or should i take different different pages(15 pagges) according cities name. And also i've to make my site considering SEO(search engine optimization). So which way i should go through.
And also, how can i convert my .aspx page into html page for improving the speed
|
|
|
|
|
.NET- India wrote: And also, how can i convert my .aspx page into html page for improving the speed
Who told you this?
.NET- India wrote: But my question is is it okay to have a single page and bringing the data dynamically or should i take different different pages(15 pagges) according cities name. And also i've to make my site considering SEO(search engine optimization). So which way i should go through.
Create a single page to retrieve and display the data according to cities.
You may later use URL rewriting to make the pages look like they are different pages. It will also help the search engines to consider them seperately.
Hope this helps.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i searched in the net to get a help for this , but didn't ge ta proper answer, do any one know how to catch the event of browser closing , or any idea to handle this situation--> abandon the session when browser closed
|
|
|
|
|
The window.onbeforeunload event will catch it. But this event will also be fired if you postback the web page. Therefore you cannot differentiate whether the browser is closed or the web page is submitted using this event.
|
|
|
|
|
|
As i said in my answer, the onunload and onbeforeunload will be fired whenever the browser is closed or the web page is submitted to the server. Therefore you cannot differentiate between these two events. Therefore it is not advisable to handle this event.
|
|
|
|
|
tanks for both of u , is there any other option to address this issue.
|
|
|
|
|
Hi Prasadbuddhika,.. this is a property of session that session will automatically expire with browser close. Means if u close any browser window, all session will automatically expire.
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
on the submit of the form,i want to search the data given in the textbox control in google.com.
now, i want the result page for the data given in the textbox
truphis
|
|
|
|
|
Why is teh subject Screen Scrapping thn?
codesairam wrote: now, i want the result page for the data given in the textbox
Which result page are you talking about?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Why do you want to scrap .. ? try this code. Is this do you want to do exactly
<form method="get" action="http://www.google.com/search">
<input type="text" name="q" size="31"
maxlength="255" value="" />
<input type="submit" value="Google Search" />
</form>
|
|
|
|
|
HI, i have one data table with all data. Now i want to create a new table in sqlserver and export this data to sqlserver table. How can we achieve this without using loop in data table. Is there any direct method ?
or any alternative to do this ? I would appreiciate your help.
G. Satish
|
|
|
|
|