|
Hi All,
I have a windows service, which integrates with ASP.Net application, when I am trying to install the service using following command
"installutil /account=LocalSystem /user=xxxxx /password=xxxxxatgmail StatusMessageService.exe" its giving following error. I am unable to find the reason for this any help would be appreciate.
"An exception occurred during the Install phase.
System.InvalidOperationException: Cannot open Service Control Manager on computer '.'. This operation might require other privileges.
The inner exception System.ComponentModel.Win32Exception was thrown with the following error message: Access is denied."
My aacount credentials are correct still why is it giving this exception. Can anybody please help me in this, its little urgent. I am trying my best to do ti as well but, one shot from the other side also. Please help me, thanks.
My Service is written as below which was working before and was writing in to the file, but now when I am trying to install again its throwing exception above.
protected override void OnStart(string[] args)
{
AddToFile("Starting Service :: Time : " + DateTime.Now.ToString());
timer.Elapsed += new ElapsedEventHandler(OnElapsedTime);
timer.Interval = 1000;
timer.Enabled = true;
}
protected override void OnStop()
{
timer.Enabled = false;
AddToFile("Stopping Service");
}
private void OnElapsedTime(object source, ElapsedEventArgs e)
{
AddToFile(" Another entry");
}
private void AddToFile(string contents)
{
FileStream fs = new
FileStream(@"D:\Test\timerserv.txt", FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
sw.BaseStream.Seek(0, SeekOrigin.End);
sw.WriteLine(contents);
sw.Flush();
sw.Close();
}
In the log file it is giving me the following exception
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the D:\StatusMessageService\StatusMessageService\bin\Debug\StatusMessageService.exe assembly's progress.
The file is located at D:\StatusMessageService\StatusMessageService\bin\Debug\StatusMessageService.InstallLog.
An exception occurred during the Install phase.
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.
The Rollback phase of the installation is beginning.
See the contents of the log file for the D:\StatusMessageService\StatusMessageService\bin\Debug\StatusMessageService.exe assembly's progress.
The file is located at D:\StatusMessageService\StatusMessageService\bin\Debug\StatusMessageService.InstallLog.
The Rollback phase completed successfully.
The transacted install has completed.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
modified on Thursday, February 24, 2011 6:50 PM
|
|
|
|
|
indian143 wrote: "An exception occurred during the Install phase.
System.InvalidOperationException: Cannot open Service Control Manager on computer '.'. This operation might require other privileges.
The inner exception System.ComponentModel.Win32Exception was thrown with the following error message: Access is denied."
Looks like you need elevated privileges to perform this operation. Go to command prompt and type runas /noprofile /user:localmachinename\administrator cmd which will open up a command prompt for administrator. Try installutil from there.
Best wishes,
Navaneeth
|
|
|
|
|
Hi Navaneeth,
Even if I did it, its giving me the following exception, can you please help in in this. The Service is not there, its not there but the message is stating that service already exists.
Is there any where service may be hidden.
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the D:\StatusMessageService\StatusMessageService\bin\Debug\StatusMessageService.exe assembly's progress.
The file is located at D:\StatusMessageService\StatusMessageService\bin\Debug\StatusMessageService.InstallLog.
An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The specified service already exists
The Rollback phase of the installation is beginning.
See the contents of the log file for the D:\StatusMessageService\StatusMessageService\bin\Debug\StatusMessageService.exe assembly's progress.
The file is located at D:\StatusMessageService\StatusMessageService\bin\Debug\StatusMessageService.InstallLog.
The Rollback phase completed successfully.
The transacted install has completed.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Looks like it is not properly cleaned up after the last failure. Can you try sc delete service-name , restart the machine and install again? If that didn't work, you might have to edit some registry entries to remove from the services list.
Best wishes,
Navaneeth
|
|
|
|
|
I am having trouble getting a logged in username to use on an intranet site. I use HttpContext.Current.Request.ServerVariables["LOGON_USER"] I Get "Network Service". If I run the application in debug locally I get the Domain\username but not when I run it on our intranet. I think its related about web.config and IIS 7 settings.
How can I fix it?
Thanks...
|
|
|
|
|
Try using HttpContext.Current.User.Identity.Name
|
|
|
|
|
or
System.Web.HttpContext.Current.Request.LogonUserIdentity.Name;
if you want the SAMAccountName
or
public string Whoami()
{
string str;
int idx;
str = System.Web.HttpContext.Current.Request.LogonUserIdentity.Name;
idx = str.IndexOf("\\");
return str.Substring(idx + 1);
}
if you don't want the Domain in there.
..and water fell from the sky like rain.
|
|
|
|
|
I have a huge tree that is made in visual studio 2005 Windows application, it is made using the designer, and I would like to take this tree to an ASP.Net application. I tried copy paste the control but it didn't work lol...
So is their a way i can move this tree from the windows application to the web application? Or I have to redesign it from zero?
Thank you in Advance
|
|
|
|
|
The treeview control in a Windows application is located in the System.Windows.Forms namespace. In an ASP.NET application, you need to use the treeview control in the System.Web.UI.WebControls namespace. As these are two different controls, you will have to re-create the treview from scratch in your ASP.NET application.
|
|
|
|
|
No Dear, web is very deferent environment. it's controls visualization is based on rendering them to HTML tags.
you can just use the TreeView control available in the 'Navigation' tab in the Toolbox.
if you nead to build your custom Controls you can inhert from System.Web.UI.WebControls.WebControl .
for anyy further assist please contact me on ali.alomairi@hotmail.com
100
Help people,so poeple can help you.
|
|
|
|
|
I required sourcecode for online admission system.
|
|
|
|
|
sunny mehra wrote: I required sourcecode for online admission system
Then, this is not the right forum for you.
Search in CodePlex or google. I m sure you will get many similar applications.
If you are facing some issue during your development, ask for help.
|
|
|
|
|
This is either homework or you've taken on a job for which you are woefully lacking in ability. Either way, this is the wrong place to ask.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
This is wrong place to ask. Plus try Google first!
|
|
|
|
|
So your question is "I require someone to do my job for me"?
Neato, what do you intend to do with your day, sun your self in the Bahamas or just kick back with a nice coffee and a good read perhaps?
|
|
|
|
|
Hello Experts!
I am from U.K. and my server hosted in U.S.
I am using Ajax Calender on my page. Ajax Calender Date Format (MM/dd/yyyy) is working fine for retrieving particular data from SQL Server (Localhost and Web Server). But I need U.K. date format which is dd/MM/yyyy. For this reason I have used the following function:
Private Function SelectDate() As String<br />
Dim NewDate As String = ""<br />
Try<br />
Dim SelectedDate As DateTime = txtSelectDate.Text.ToString()<br />
NewDate = SelectedDate.ToString("MM/dd/yyyy")<br />
Catch ex As Exception<br />
lblmessage.Text = "Please put a valid date !! (date format should be dd/mm/yyyy)"<br />
End Try<br />
Return NewDate<br />
End Function
It's working fine on localhost but the problem is:
After publishing on hosting server it's not working properly. Ajax Calender format is dd/MM/yyyy but after clicking btnSearch date format is being changed to MM/dd/yyyy! and I can not retrieve correct information.
Waiting for your advise!
|
|
|
|
|
First, add this page directive to your page: Culture="en-GB" .
Then set the Format attribute of the CalendarExtender as: Format="dd/MM/yyyy" .
Here is the declaration for one I have just used and it works fine:
<asp:TextBox ID="txtDateTo" runat="server" Columns="8"/>
<asp:CalendarExtender ID="txtDateTo_CalendarExtender" runat="server" TargetControlID="txtDateTo" Format="dd/MM/yyyy"/>
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
thanks for your quick reply.
Columns="8" what does it mean?
|
|
|
|
|
I tend to use columns rather than width for text controls as it denotes the number of characters wide the control should be rather than an arbitrary width.
TextBox.Columns Property[^]
ps If you like my answer then vote for it!!!
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
sorry! brother its not working
when date is like 28/02/2011 no output
when date is from 01/02/2011 to 12/02/2011 its working fine
its not showing any data after 12th day of month
like 13/02/2011 to 28/02/2011 doesn't work
any other solution !!!
if Ajax Calender date format is MM/dd/yyyy its working fine with no prob
if Ajax Calender date format is dd/MM/yyyy its working not properly
any other idea
|
|
|
|
|
guys, i got the exception
Sys.ScriptLoadFailedException: The script '...' contains multiple calls to Sys.Application.notifyScriptLoaded(). Only one is allowed.]
while i was calling the method UpdatePanel.Update();
any one has an idea.
|
|
|
|
|
hi, ali;
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
does this line of code remind you with some thing?
|
|
|
|
|
well ..., I guess it does.
100
Help people,so poeple can help you.
|
|
|
|
|
Hi guys,
I have explained my probs here..,
this problem is occuring in IE browser only...,Mozila its working fine...,
Plz click on the following url in IE browser
http://www.justtrade.in/Portfoliotracker/Default.aspx
U will see "Registered User" link plz click tht one..., u will get a login page, with out changing the browser url...,becoz its opening in an iframe...,
so, the login page also in an iframe...,
here if i am trying to login a user...,if the user is authenticated...,
i am using his user name as session...,and redirecting him to home page...,
but, if the valid user login also, its redirecting him to login page only...,
this problem in IE browser only...,Mozila its working fine...,
can u plz tell me y its not working in IE? and how to solve this one?
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
guys, you know the function 'Page_Validate('validationgroup') ' we use to validate controls?
I need the opposite of it (e.i. hide all validators within a certain group.
waiting for your replays;
Help people,so poeple can help you.
|
|
|
|