Click here to Skip to main content
15,902,198 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRe: How can I use a connection string stored in the web.config file Pin
Big Ralph8-Nov-07 1:35
Big Ralph8-Nov-07 1:35 
Questionways to create table Pin
alexfromto7-Nov-07 2:56
alexfromto7-Nov-07 2:56 
AnswerRe: ways to create table Pin
Michael Sync7-Nov-07 4:08
Michael Sync7-Nov-07 4:08 
GeneralRe: ways to create table Pin
alexfromto7-Nov-07 4:30
alexfromto7-Nov-07 4:30 
GeneralRe: ways to create table Pin
alexfromto7-Nov-07 11:23
alexfromto7-Nov-07 11:23 
QuestionIs there a way to check the eBay API Services offline? Pin
Rocky#7-Nov-07 2:55
Rocky#7-Nov-07 2:55 
AnswerRe: Is there a way to check the eBay API Services offline? Pin
Rocky#7-Nov-07 3:19
Rocky#7-Nov-07 3:19 
QuestionFile Upload to another server [modified] Pin
GaryWoodfine 7-Nov-07 1:57
professionalGaryWoodfine 7-Nov-07 1:57 
Hi guys I got a bit of a problem that has taken me days to try and sort out and I'm getting nowhere.
basically I have to servers that are setup in a DMZ, as a workgroup, one server is a Application Server and the other is a Database and File Server. I need to be able to be able to upload files from the application server the file server via a UNC path. but everything I have tried seems to fail.
I recieve errors along the lines of "can't find part of path", "incorrect user/password", etc.
I have tried a Myriad of approaches including creating a user account on both machines, and impersonating that account, to write, Created a Virtual Directory and used :
string SaveLocation =System.Web.Hosting.HostingEnvironment.MapPath ("~/webmedia/article/" + fn )
To get the UNC path, Stored the UNC path in the Web.config file, but nothing seems to work.

I haved scoured the net for any information, but seem to have got nowhere, I have found one or two articles but they basically tell me what I have tried. I was wondering if anybody knows of any other Tut's/atricles I could read.

I have included some of my code in the help somebody could spot an error

HttpPostedFile selectedPDF = ImageUploadFile.PostedFile;<br />
<br />
        if ((selectedPDF != null) && (selectedPDF.ContentLength > 0) && selectedPDF.ContentType == "application/pdf")<br />
        {<br />
             try<br />
                {<br />
                    string fn = System.IO.Path.GetFileName(selectedPDF.FileName);<br />
                    string dir = ConfigurationManager.AppSettings["docpath"].ToString();<br />
<br />
                   // string SaveLocation =System.Web.Hosting.HostingEnvironment.MapPath ("~/webmedia/article/" + fn );<br />
                    string SaveLocation = ConfigurationManager.AppSettings["devdocpath"].ToString() + fn;<br />
                    selectedPDF.SaveAs(SaveLocation);<br />
.....



-- modified at 8:47 Wednesday 7th November, 2007

I have tried doing a simple app here locally on my own network and haven't even tried using impersonation, but it just works

here is the sample code. I am completely baffled

try<br />
    {<br />
      HttpPostedFile theFile = FileUpload1.PostedFile;<br />
      //System.IO.Path.GetFileName(selectedPDF.FileName)<br />
      FileUpload1.SaveAs(@"\\Cyko\d\" + System.IO.Path.GetFileName(theFile.FileName).ToString());<br />
    }


Kind Regards,
Gary


My Website || My Blog || My Articles

Questionhow to call the code behind function in source file of javascipt Pin
Sonia Gupta7-Nov-07 1:31
Sonia Gupta7-Nov-07 1:31 
AnswerRe: how to call the code behind function in source file of javascipt Pin
Pete O'Hanlon7-Nov-07 2:03
mvePete O'Hanlon7-Nov-07 2:03 
Questioncheck box list Pin
rameshdontagani7-Nov-07 1:30
rameshdontagani7-Nov-07 1:30 
AnswerRe: check box list Pin
J4amieC7-Nov-07 1:56
J4amieC7-Nov-07 1:56 
AnswerRe: check box list Pin
John-ph7-Nov-07 5:00
John-ph7-Nov-07 5:00 
Questioncustom validator problem Pin
N a r e s h P a t e l7-Nov-07 1:10
N a r e s h P a t e l7-Nov-07 1:10 
AnswerRe: custom validator problem Pin
Michael Sync7-Nov-07 4:44
Michael Sync7-Nov-07 4:44 
Questionhyperlink control Pin
Sonia Gupta7-Nov-07 0:55
Sonia Gupta7-Nov-07 0:55 
AnswerRe: hyperlink control Pin
Christian Graus7-Nov-07 1:01
protectorChristian Graus7-Nov-07 1:01 
GeneralRe: hyperlink control [modified] Pin
Sonia Gupta7-Nov-07 1:17
Sonia Gupta7-Nov-07 1:17 
GeneralRe: hyperlink control Pin
Christian Graus7-Nov-07 1:25
protectorChristian Graus7-Nov-07 1:25 
GeneralRe: hyperlink control Pin
J4amieC7-Nov-07 1:49
J4amieC7-Nov-07 1:49 
GeneralRe: hyperlink control Pin
Sonia Gupta7-Nov-07 1:52
Sonia Gupta7-Nov-07 1:52 
GeneralRe: hyperlink control Pin
J4amieC7-Nov-07 1:58
J4amieC7-Nov-07 1:58 
GeneralRe: hyperlink control Pin
J4amieC7-Nov-07 1:51
J4amieC7-Nov-07 1:51 
QuestionHow to call server side method thru javascript Pin
kantipudi7-Nov-07 0:37
kantipudi7-Nov-07 0:37 
AnswerRe: How to call server side method thru javascript Pin
SHatchard7-Nov-07 0:46
SHatchard7-Nov-07 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.