Reputation: 6281
I'll try to do my best to explain my problem.
I have 2 separate projects which are part of the same application in Visual Studio. One of them is server-sided and the other is client-sided.
The client sided project uses an appSettings key called XMLFileName which is used to retrieve data from an XML and populate a dataset with the retrieved info. In this client sided project I have a method that performs some check in the dataset.
When I try to call that method from the server sided project, I can't get the dataset populated since the XMLFileName isn't being read by the server sided project due to it not being defined in its application settings. If I hardcode the file name string on the server sided project it won't find it since it looks in a different folder.
How should I proceed with this? Am I being clear enough?
Thanks, Eton B.
Upvotes: 0
Views: 623
Reputation: 28701
I may not understand the problem completely, but it sounds like you have two different applications (client and server) using the same method (e.g. GetXmlFile()
) to retrieve the same file (File.xml). If that's the case, then you probably need to have the XML file on a shared drive that can be accessed by a UNC path (e.g. `\myclient\XMLFiles\File.xml').
If that is the scenario, can you change the method GetXmlFile()
to use a UNC path to access the file, and to store a UNC path and file name in your appSettings?
If I'm mis-understanding the situation, please let me know and I'll update my answer accordingly.
Hope this helps.
Upvotes: 0
Reputation: 3371
Why not just add the same setting to the server-side project? Am I missing something?
Upvotes: 1