p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   SharePoint Development (http://p2p.wrox.com/forumdisplay.php?f=213)
-   -   Access file in WSS through browser or C# code? (http://p2p.wrox.com/showthread.php?t=35198)

askman November 17th, 2005 12:15 AM

Access file in WSS through browser or C# code?
If I use OWA(Outlook Web Access) to access WSS, it can access directory. For example, http://localhost/public/myfolder. If I point to a file in such directory, for example http://localhost/public/myfolder/a1.xml, then browser will display 403 error and a1.xml can not be accessed.
Similarity, if I use following code to acesss http://localhost/public/myfolder/a1.xml, it still tell me the 403 error from catch statements:

 WebClient client = new WebClient();
 client.Credentials = new System.Net.NetworkCredential("username", "password");
 inputStream = client.OpenRead("http://localhost/public/myfolder/a1.xml");
 reader = new XmlTextReader(inputStream);
catch (WebException webEx)
Would you please tell me how to resolve this problem?

All times are GMT -4. The time now is 12:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.