Tapan

I have used the

doc.Save(Application.StartupPath + @\..\config\\vb_alias.xml); to save on my local machine & it works here.

But when in a client-server environment i want to save some thing it gives error that

Access to the path \\client57\myTest\product\config\vb_alias.xml is denied.

Please help me.

With regards

Tapan




Re: XML and the .NET Framework How to save xml file in a client-server environment...

Sinan Ussakli - MSFT

Hi,

From the computer that Application is running, check to see that you have write access, and sharing access to the use that this application is running. (right click on any directory and check Sharing and Security tabs)

Thanks,

Sinan






Re: XML and the .NET Framework How to save xml file in a client-server environment...

Tapan

Thanks for your answer, but i have already checked all the permissions. still than it is not working.

Please help me(if there is some codes to solve this in c#...)

With Regards

Tapan






Re: XML and the .NET Framework How to save xml file in a client-server environment...

Umesh.Gandhi

Hi Tapan,

Apart from the accesse rights to shared loaction, If the name of MXL your trying to write is always going to be 'vb_Alias.xml' then make sure the file that you are trying to overwrite is not read only.

I tried to replicate the exception that you where getting. Wrote following test code. Executed it for first time and generated the file, then I went and marked the file as read only and again executed the code but this time I got the error that you have mentioned.

XmlDocument objXD = new XmlDocument();

objXD.LoadXml("<Root><Test1>1</Test1></Root>");

objXD.Save(@"D:\Umesh\Test.xml");

Apart from the accesse rights to shared location check if your generated file is getting marked as read only.

Regards,

Umesh.





Re: XML and the .NET Framework How to save xml file in a client-server environment...

Tapan

Thanks it runs.... there is the problem with security permission, now it works success fully.

With Regards

Tapan