views:

262

answers:

2

I need to create a .dll assembly to read contents of a xml file embedded as a resource and show the content on an ASP.NET page.

I searched through the internet for solution to modify the xml file (which embedded as a resource in the .dll assembly) and found out that it's almost impossible to do so.

Here's my scenario:
1. I created a .dll assembly to read the contents of a xml file.
2. The result will be shown on an ASP.NET page.
3. There are times where I need to modify the contents of the xml file during run time.
4. Updated results should shown on ASP.NET page.
5. The .dll assembly will be installed as a COM+ service to be accessed by the ASP.NET page.

So I wonder if there are alternative solutions to this?

This is quite urgent so I hope there are answers as soon as possible. Your help will be greatly appreciated.

Thanks in advance!

+1  A: 

Short answer is no...

http://stackoverflow.com/questions/1038795/can-i-modify-the-content-of-an-embedded-resource-text-xml-file-in-a-net-applic

Consider an encrypted, zero-install, single file database like SQL Server Compact or SQLite.

kervin
A: 

You can't do it because while the DLL is loaded, it cannot be changed (even can't be opened for write). Besides it would change the strong name of the assembly.

app.config file is deliberately designed for these cases. Just move the data to manifest file and .NET can be used to manipulate with it.

Vladimir Lifliand