|
The network drive is mapped to a particular user (yours I presume). It is highly unlikely that you are using your user for the service, so it won't be able to see the mapping because this is not present for the user. Your choices are:
1. Rewrite your code to use the UNC path.
2. Change the user of the service to your user.
3. Add the mapping to the user that the service runs against.
Option 1 is your best option (oh, and don't hardcode the value - pick it up from a config file so that you can change it later on.)
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanx for the quick reply
If I use Option 1, the share uses Authentication. It's basically a DMZ share...
How can I then authenticate the service?
If I use Option 2, I have tried to set the Log On of the service to my domain logon, thought it would then see my mapped drive???
Under which ServiceAccount type should I install the service?
Any advice here?
|
|
|
|
|
This is most likely because your service is running under the local account. A local account is just that - local. You can either configure the service to run with a specific user's credentials (I've done this and it works) or use a UNC path (I haven't tried this, so I don't know).
Cheers,
विक्रम
And sleep will come, it comes to us all
And some will fade and some will fall
|
|
|
|
|
Hi thanx for the reply!
I ran the service using my domain login, I thought that this will allow the service to see MY mapped drives. But still got the same error.
Under which ServiceAccount should I then install,localService, Network Service?
Please assist this is of great importance
|
|
|
|
|
|
Mapping drives is so '80s; use a UNC.
|
|
|
|
|
the '80s were great, so mapping drives also
|
|
|
|
|
Mapping isnt so 80's when having to interface with DOS
|
|
|
|
|
hi all,
i use ShowWindow(hWnd, SW_HIDE); in order to hide a running windows application.
it works good. and hide any application i want. (for example notepad)
(after calling that fuction the app is not seen in taskbar any more but available in task manager - still running in background)
the problem is:
i cant bring that process back with using ShowWindow(hWnd, SW_RESTORE);
what should i do in order to bring the hidden process back to the foreground ?
any ideas ?
thanks in advance.
MFA
|
|
|
|
|
Try ShowWindow(hWnd, SW_SHOW); instead.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Message Closed
modified 27-Apr-15 11:15am.
|
|
|
|
|
The problem that you have here is that MainWindowHandle is 0 because the window is hidden. To get round this, save the window handle that you used to hide it and pass that into ShowWindow instead of the MainWindowHandle .
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Message Closed
modified 27-Apr-15 11:15am.
|
|
|
|
|
Excellent. Glad to be of service.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
We are planning to rewrite out data access layers in framework 3.0 (currently its is Framework 1.1). We are using DataSets throughout for data access, and also while passing data from Data Layer to other layers.
I have to find out alternative data containers, because DataSet would consume lots of memory because mostly we may have to fetch a few rows and for that we don't want to use a DataSet. DataTable could be an alternative, but I wanted to know if there are other data efficient data containers in new .NET Framework, or another method of data access.
I am doing my research on google, still it would be great if someone could point me in the right direction.
Regards,
Blumen
|
|
|
|
|
Not really, your other options are to pass XML, or to create collections of your entity objects in your data layer, and pass those out.
Of course, they are passed by reference, anyhow.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you for that response.
Can I avoid DataTable and DataSet if I use xml?
|
|
|
|
|
You could, but it you be a nightmare to manage. XML is best used as a transfer mechanism, not as a storage mechanism.
If you were to use XML you would have to convert everything into it, including converting numbers to their string representations. If you need anything out of it you have to parse the strings back into their original representation. That takes time.
Have you considered some alternative patterns like DTOs (Data Transfer Objects) - These are lightweight objects that hold some data. It you want to represent a table you can create a collection of DTOs.
An example of a simple DTO:
public class PersonDTO
{
public int PersonID;
public string FirstName;
public string Surname;
public string MiddleNames;
public DateTime DateOfBirth
} Although it would be preferable if you created the fields as private and created property accessors for each of the fields.
|
|
|
|
|
Hai Everybody,
Can any one tell be how to program with the Exchange Server 2003 in C# with the help of API's.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I have one doubt on User32.dll.
Convert html to Image using c#.
i have download the code from the site http://www.codeproject.com/cs/media/IECapture.asp.
It is working fine in Winxp.
but windows 2000 throwing some errors.
I have debug--> it is problem in User32.dll doesn't support PrintWindow in Windows 2000
Please any one help me out from this
Subash
|
|
|
|
|
What are the exceptions that it is throwing?
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thanks.Exception Is Entry Point cannot be loaded in User32.dll PrintWindow.
Subash
|
|
|
|
|
If you look at the bottom of this page[^] under "Requirements" from MSDN, you will see that the PrintWindow is only supported on XP and 2003.
From the page:
Windows NT/2000/XP/Vista: Included in Windows XP and Windows Server 2003.
Windows 95/98/Me: Unsupported.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Any other solution for it.
My Scope of the Project is I want to convert HTML or any web page to Image Format using Dotnet. Do u have any solution of it.Please let me know
Subash
|
|
|
|
|
Sorry, you would be better off asking the author of the article you got the original code from.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|