469,572 Members | 1,279 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

XML File Transfer

I need to transfer an XML file between an application on the client and the
server. This would in fact be a copy of the application's .config file.

HTML <input form=...would transfer the file but the user would have to
select the file and initiate the transfer.

I would like the transfer to start under program control and not require the
user's interaction.

In the past I would simply do a GET or POST transfer of a collection of
fields and reconstruct the fields into a file on the server when it arrived.

Is there a published technique to permit transfer of a hidden XML file with
a predefined name and no user interaction?

.... Thom
__________________________________________________ _
Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
Sep 4 '08 #1
6 2614
"Thom Little" <th**@tlanet.netwrote in message
news:u%****************@TK2MSFTNGP05.phx.gbl...
I need to transfer an XML file between an application on the client and
the
server. This would in fact be a copy of the application's .config file.
You have to be joking...
Is there a published technique to permit transfer of a hidden XML file
with
a predefined name and no user interaction?
Absolutely not. All modern browsers are designed specifically to prevent
this type of thing, for fairly obvious security reasons. Think about it - if
you could upload an XML file from a client machine, what's to stop you
uploading a password file, an accounts file etc...?

Your only option would be to write an ActiveX control for this, but that
would restrict you to Microsoft IE and would mean that you would have to
ramp the security right down just to get it to launch...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 4 '08 #2
I had recognized the issue you bring up and assumed that is the reason the
HTML solution kept the user in the loop.

An apparent solution to the security issue was (I think) addressed in the
Media Player plug in. It apparently only allows relative addresses that are
at the same level as or lower than the module performing the reference.
This prevents it from accessing any of the sensitive files you started to
list.

Here's my assumption ... if I can access the data, shove it into a bunch of
fields, send it by GET or POST, and the reconstruct the file when it arrives
.... there is no apparent added exposure in being able to simply transfer it
as an XML file instead.

In my case there is a .NET framework Windows application using WebBrowser to
send information to my ASP.NET server.

Any additional ideas are appreciated.

.... Thom
__________________________________________________ _
Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
Sep 4 '08 #3
"Thom Little" <th**@tlanet.netwrote in message
news:eX****************@TK2MSFTNGP02.phx.gbl...
Here's my assumption ... if I can access the data,
But that's the whole point - you can't, because the browser won't let you
access it without user intervention...
In my case there is a .NET framework Windows application using WebBrowser
to
send information to my ASP.NET server.
Ah, but that's *completely* different... A Windows app, being installed on
the desktop, has none of the security limitations of a remote web
application running in a browser...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 4 '08 #4
Can you point me in the direction of where to see how the connection can be
setup between the Windows application and remote web server to allow the XML
file transfer? The C# newsgroup perhaps?

Thanks.

.... Thom
__________________________________________________ _
Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
Sep 4 '08 #5
"Thom Little" <th**@tlanet.netwrote in message
news:en**************@TK2MSFTNGP02.phx.gbl...
Can you point me in the direction of where to see how the connection can
be
setup between the Windows application and remote web server to allow the
XML
file transfer? The C# newsgroup perhaps?
Yes, that would be the right place to ask questions about WinForms apps
written in C#...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 4 '08 #6
look at the webclient class. it has an uploadfile method.

-- bruce (sqlwork.com)

Thom Little wrote:
Can you point me in the direction of where to see how the connection can be
setup between the Windows application and remote web server to allow the XML
file transfer? The C# newsgroup perhaps?

Thanks.

... Thom
__________________________________________________ _
Thom Little - www.tlanet.net - Thom Little Associates, Ltd.
Sep 5 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Lingyun Yang | last post: by
11 posts views Thread by Abhishek | last post: by
11 posts views Thread by Stephan Steiner | last post: by
8 posts views Thread by Xarky | last post: by
1 post views Thread by Alex | last post: by
10 posts views Thread by David | last post: by
2 posts views Thread by tedpottel | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.