With an ASP.NET application, I try to run an external program (like EXE, BAT)
with a logon of an another user. I use CreateProcessWi thLogonW from API
"advapi32.d ll" . When my ASP.NET application launches my EXE program via
CreateProcessWi thLogonW, the process starts but an error appears "Applicatio n
failed to initialze" : why ? 6 3235 When my ASP.NET application launches my EXE program via CreateProcessW ithLogonW, the process starts but an error appears "Applicatio n failed to initialze" : why ?
Alsmost impossible to say without knowing more about the applications,
seeing your calling code etc.
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
"Steve4D" <St*****@discus sions.microsoft .com> wrote in message
news:D2******** *************** ***********@mic rosoft.com...
| With an ASP.NET application, I try to run an external program (like EXE,
BAT)
| with a logon of an another user. I use CreateProcessWi thLogonW from API
| "advapi32.d ll" . When my ASP.NET application launches my EXE program via
| CreateProcessWi thLogonW, the process starts but an error appears
"Applicatio n
| failed to initialze" : why ?
|
A few question, what are you trying to achieve by this? If you are trying to
launch an interactive process using this API, you better stop here as it
won't work anyway.
If you are just trying to launch a background process using alternate
credentials;
What is the identity of the ASP.NET process?
Note that you can't use localsystem (SYSTEM) to call
CreateProcessWi thLogonW.
What's the value of startInfo.lpDes ktop?
What is the value of the dwLogonFlags argument?
Willy.
I use IIS 6 under Windows2003 Server.
The Framework.Net version is 1.1.4322 .
My server is in the domain Domain_1.
I try to launch a background process using alternate credentials with the
login Domain_1\Proces sUser. The process is a simple c# program.
The identity of the ASP.Net process is defined with the login
Domain_1\ASPUse r.
The value of StartUpInfo.lpD esktop is NULL.
The value of dwLogonFlags is LOGON_NETCREDEN TIALS_ONLY .
Steve.
"Willy Denoyette [MVP]" a écrit : "Steve4D" <St*****@discus sions.microsoft .com> wrote in message news:D2******** *************** ***********@mic rosoft.com... | With an ASP.NET application, I try to run an external program (like EXE, BAT) | with a logon of an another user. I use CreateProcessWi thLogonW from API | "advapi32.d ll" . When my ASP.NET application launches my EXE program via | CreateProcessWi thLogonW, the process starts but an error appears "Applicatio n | failed to initialze" : why ? |
A few question, what are you trying to achieve by this? If you are trying to launch an interactive process using this API, you better stop here as it won't work anyway.
If you are just trying to launch a background process using alternate credentials; What is the identity of the ASP.NET process? Note that you can't use localsystem (SYSTEM) to call CreateProcessWi thLogonW. What's the value of startInfo.lpDes ktop? What is the value of the dwLogonFlags argument?
Willy.
Ok, but what kind of application is this (the simple C#), don't forget that
the error comes from this application that fails to initialize.
What happens if you run this from a console application?
Willy.
"Steve4D" <St*****@discus sions.microsoft .com> wrote in message
news:D9******** *************** ***********@mic rosoft.com...
|I use IIS 6 under Windows2003 Server.
| The Framework.Net version is 1.1.4322 .
| My server is in the domain Domain_1.
| I try to launch a background process using alternate credentials with the
| login Domain_1\Proces sUser. The process is a simple c# program.
| The identity of the ASP.Net process is defined with the login
| Domain_1\ASPUse r.
| The value of StartUpInfo.lpD esktop is NULL.
| The value of dwLogonFlags is LOGON_NETCREDEN TIALS_ONLY .
|
| Steve.
|
|
| "Willy Denoyette [MVP]" a écrit :
|
| >
| > "Steve4D" <St*****@discus sions.microsoft .com> wrote in message
| > news:D2******** *************** ***********@mic rosoft.com...
| > | With an ASP.NET application, I try to run an external program (like
EXE,
| > BAT)
| > | with a logon of an another user. I use CreateProcessWi thLogonW from
API
| > | "advapi32.d ll" . When my ASP.NET application launches my EXE program
via
| > | CreateProcessWi thLogonW, the process starts but an error appears
| > "Applicatio n
| > | failed to initialze" : why ?
| > |
| >
| > A few question, what are you trying to achieve by this? If you are
trying to
| > launch an interactive process using this API, you better stop here as it
| > won't work anyway.
| >
| > If you are just trying to launch a background process using alternate
| > credentials;
| > What is the identity of the ASP.NET process?
| > Note that you can't use localsystem (SYSTEM) to call
| > CreateProcessWi thLogonW.
| > What's the value of startInfo.lpDes ktop?
| > What is the value of the dwLogonFlags argument?
| >
| > Willy.
| >
| >
| >
When I run this from a console application: there is no error.
We develop on WindowsXP SP2: there is no error with our Web developement
configuration.
On our server W2003, the ASP.Net application creates the process with the
simple c# program and there the error appears. In the Windows tasks list, we
can see the new process.
We made the test with C# program with no code inside: we have the same error
on server W2003.
"Willy Denoyette [MVP]" a écrit : Ok, but what kind of application is this (the simple C#), don't forget that the error comes from this application that fails to initialize. What happens if you run this from a console application?
Willy.
"Steve4D" <St*****@discus sions.microsoft .com> wrote in message news:D9******** *************** ***********@mic rosoft.com... |I use IIS 6 under Windows2003 Server. | The Framework.Net version is 1.1.4322 . | My server is in the domain Domain_1. | I try to launch a background process using alternate credentials with the | login Domain_1\Proces sUser. The process is a simple c# program. | The identity of the ASP.Net process is defined with the login | Domain_1\ASPUse r. | The value of StartUpInfo.lpD esktop is NULL. | The value of dwLogonFlags is LOGON_NETCREDEN TIALS_ONLY . | | Steve. | | | "Willy Denoyette [MVP]" a écrit : | | > | > "Steve4D" <St*****@discus sions.microsoft .com> wrote in message | > news:D2******** *************** ***********@mic rosoft.com... | > | With an ASP.NET application, I try to run an external program (like EXE, | > BAT) | > | with a logon of an another user. I use CreateProcessWi thLogonW from API | > | "advapi32.d ll" . When my ASP.NET application launches my EXE program via | > | CreateProcessWi thLogonW, the process starts but an error appears | > "Applicatio n | > | failed to initialze" : why ? | > | | > | > A few question, what are you trying to achieve by this? If you are trying to | > launch an interactive process using this API, you better stop here as it | > won't work anyway. | > | > If you are just trying to launch a background process using alternate | > credentials; | > What is the identity of the ASP.NET process? | > Note that you can't use localsystem (SYSTEM) to call | > CreateProcessWi thLogonW. | > What's the value of startInfo.lpDes ktop? | > What is the value of the dwLogonFlags argument? | > | > Willy. | > | > | >
Can you try to Logon as Domain_1\ASPUse r on W2K3 (this is the account your
asp.net worker process runs as), and run the console program like as you did
on XP.
You also need to check the return code of CreateProcessWi thLogonW, make sure
SetLastError is true like...
[DllImport("adva pi32.dll", CharSet=CharSet .Auto, SetLastError=tr ue)]
internal static extern bool CreateProcessWi thLogonW(
....
When it fails, do you get a dialog box with a message "...Failed to
Initilaize Error 0xc0000142"?
Willy.
"Steve4D" <St*****@discus sions.microsoft .com> wrote in message
news:4E******** *************** ***********@mic rosoft.com...
| When I run this from a console application: there is no error.
| We develop on WindowsXP SP2: there is no error with our Web developement
| configuration.
| On our server W2003, the ASP.Net application creates the process with the
| simple c# program and there the error appears. In the Windows tasks list,
we
| can see the new process.
| We made the test with C# program with no code inside: we have the same
error
| on server W2003.
|
| "Willy Denoyette [MVP]" a écrit :
|
| > Ok, but what kind of application is this (the simple C#), don't forget
that
| > the error comes from this application that fails to initialize.
| > What happens if you run this from a console application?
| >
| > Willy.
| >
| > "Steve4D" <St*****@discus sions.microsoft .com> wrote in message
| > news:D9******** *************** ***********@mic rosoft.com...
| > |I use IIS 6 under Windows2003 Server.
| > | The Framework.Net version is 1.1.4322 .
| > | My server is in the domain Domain_1.
| > | I try to launch a background process using alternate credentials with
the
| > | login Domain_1\Proces sUser. The process is a simple c# program.
| > | The identity of the ASP.Net process is defined with the login
| > | Domain_1\ASPUse r.
| > | The value of StartUpInfo.lpD esktop is NULL.
| > | The value of dwLogonFlags is LOGON_NETCREDEN TIALS_ONLY .
| > |
| > | Steve.
| > |
| > |
| > | "Willy Denoyette [MVP]" a Ãf©crit :
| > |
| > | >
| > | > "Steve4D" <St*****@discus sions.microsoft .com> wrote in message
| > | > news:D2******** *************** ***********@mic rosoft.com...
| > | > | With an ASP.NET application, I try to run an external program
(like
| > EXE,
| > | > BAT)
| > | > | with a logon of an another user. I use CreateProcessWi thLogonW
from
| > API
| > | > | "advapi32.d ll" . When my ASP.NET application launches my EXE
program
| > via
| > | > | CreateProcessWi thLogonW, the process starts but an error appears
| > | > "Applicatio n
| > | > | failed to initialze" : why ?
| > | > |
| > | >
| > | > A few question, what are you trying to achieve by this? If you are
| > trying to
| > | > launch an interactive process using this API, you better stop here
as it
| > | > won't work anyway.
| > | >
| > | > If you are just trying to launch a background process using
alternate
| > | > credentials;
| > | > What is the identity of the ASP.NET process?
| > | > Note that you can't use localsystem (SYSTEM) to call
| > | > CreateProcessWi thLogonW.
| > | > What's the value of startInfo.lpDes ktop?
| > | > What is the value of the dwLogonFlags argument?
| > | >
| > | > Willy.
| > | >
| > | >
| > | >
| >
| >
| > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: New MSSQL DBA |
last post by:
hi all, have anyone else met with the following problem.
we've got a SQL2000SP3a on a 2 active-active node clusters of W2K3,
this cluster in using AD.
I've found that whenever I use Enterprise Manager on my local computer
to register the above instance, it will constantly produce "Failed
login for <Domain>\<DomainUser>" errors in the...
|
by: MaxiWheat |
last post by:
Hi,
I am using a software that uses MS Word to create PDF files. When I try
to run the sample code (ASP 3.0), I get an error on this statement :
Set oWord = Server.CreateObject("Word.Application")
That error says :
The call to Server.CreateObject failed while checking permissions.
Access is denied to this object.
|
by: Gustavo L. Fabro |
last post by:
Greetings!
I'm testing VS 2005 Beta 2, and I've compiled a program that
runs just fine on my computer (where VS is installed).
I've tried to run this same program on another computer
(after having installed MS .NET Framework 2.0 Beta 2 on it,
from...
|
by: Paul# |
last post by:
I want to create an aspnet app at:
http://gisims/website/apps/AdvViewer
Each time it gives me a "Web access Failed" dialog box.
I have 2 options now:
1) retry at a different location - I dont want to do this because
I don't want to save it anywhere else. I sure that this address is correct
because I can access other html files...
|
by: Steve M |
last post by:
A few users today received the message "The trust relationship between this
workstation and the primary domain failed" on their web browser while using
an ASP.NET web app. The problem went away but has anyone seen this before
on a error page? I think it occured when users were reporting general slow
web performance. I've seen it while users...
| |
by: kilo |
last post by:
Hey.. I need someone hwo can help me making my sql table..
I have no php skills. I have payed for a php program that shoud make dictation for people that have some problems reading danish.. with sound and text..
When I'm making the dictation with PHP I'm getting an error like this.: Query failed (SELECT word FROM repository): Table...
|
by: Samuel R. Neff |
last post by:
We're migrating our .NET 1.1 web application to .NET 3.5 and during
conversion we clicked "Convert to Web Application" on the web project.
The results from this conversion were inconsistent.
1. Many pages were not converted at all. They're still aspx and cs
files with generated code inside the cs file and still no partial
class...
|
by: Aegixx |
last post by:
Ok, extremely wierd situation here:
(I'll post the code below, after the explanation)
I've got a Windows application (.NET 3.5) that has a single Form with
a DataGridView embedded. The user presses a button to do a SQL query
(fill a DataSet). Before firing the query, I disable the grid/buttons
and turn on UseWaitCursor. After it...
|
by: sa6113 |
last post by:
I am using this code to connect to a windows machine using paramiko, I have
installed sshd on the machine and it works properly:
sock.connect((hostname, port))
t = paramiko.Transport(sock)
event = threading.Event()
t.start_client(event)
event.wait()
if not t.is_active():
print 'SSH negotiation failed.'
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |