|
Hi and happy new year
I've written a web application program by C# in VStudio 2005 that makes a list of all Windows Services in ther server. I want to start and stop the services. So I've used ServiceController and the mothods Start() and Stop(). But a Win32Exception (Access id Denied) appeared.
for example:
<br />
ServiceController serviceController = new ServiceController("MSSQLServer");<br />
serviceController.Start();<br />
How can I do that? Can anyone help me?
Mehdi
modified on Tuesday, January 08, 2008 3:16:11 AM
|
|
|
|
|
Hi there
I am having a page with GridView in which i have a Edit button. When i click the Edit button i make Response.Redirect to another page. I make modifications there and press OK or Cancel button which redirects me back to the GridView Page.I see the Updates if i have made. and then when i again click Edit to the same record, it shows me the old data that was there before updation. The reason is because it doesnt go to the Page_load method and doesnt get the latest data from the DataBase. But yes if i click the Cancel or OK button it does go to the Page_load method.
So my problem is that when i click Edit button second time for the same record it doesnt go to the page_load method.I know not easy for you to catch the error without seeing my code. If needed please let me know i shall post the required code. Any suggestions or help would be greatly appreciated.
Cheers
Menon
|
|
|
|
|
Have you set a breakpoint and confirmed it's not fired ? It seems more likely that it's loading from the cache.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Christian
Thank you very much. I was really lost thinking what had gone wrong and that my Page_Load is not getting fired. Yes i forgot to mention i always use breakpoints to debug my code when i have problem.
And i had also came to the conclusion because i had breakpoints and it was not going to the Page_Load i knew it.
Well Your guess was correct it was loading from the Cache. And i got it. I had put the OutputCache in the Page and that was the reason it was loading from the Cache.
Again thank you very much i had spent almost 2 days to figure this out.
If you can tell me this. Is it wrong to use the OutputCache? I was using OutputCache because the page was bit heavy and i thought it would help the page to open if i use OutputCache.
Thank you.
Cheers
Menon
|
|
|
|
|
You need to look into the outputcache documentations. I always used to implement data caching using Cache.Insert and reading from it. In my scenario, this method gave more handle than outputcache. In this all the events fires correctly. Easy way would be creating a cache utility class which manages caching for all the pages.
|
|
|
|
|
Hi Navaneeth,
Thanks for the reply. I will definitely go through the Topic Caching more deeply wherein i can learn to use it more properly.
Thanks
Cheers
Menon
|
|
|
|
|
Hi ,
I need some help about Query String like articles, Examples or E-Books. to know how pass values between pages using for Example value of selected value of DropDownList or other Controls.
Regards
Mr.Wonderful
|
|
|
|
|
|
Your post is pretty vague. Try a google search and many examples are found
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
The concept is incredibly simple. You append values to a URL using the syntax ?key=value&key=value where the ? is the first value, and all other values use &. Then you read the values, which are always strings and use things like intTryParse to convert them as needed.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Does anyone know how to filter image nudity in a online photo application?
|
|
|
|
|
No idea. That is a pretty tall order for a forum query. Only way is probably by manual inspection of each photo in the application.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
learningman wrote: Does anyone know how to filter image nudity in a online photo application?
Yeah, I don't think there is a cheap solution for this problem. Manual inspection would be my best solution as well.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
I have a website which has several links.
But there are few links when clicked gives "runtime error" with no specific details
when I refresh the same error page its working..
what could be the problem ??
Sathy
modified on Saturday, January 05, 2008 11:59:59 AM
|
|
|
|
|
Interesting..
I played a lot nothing was working ...
Atlast I opened the cofig file in the server for the website and saved it once ..
the links were working perfectly..
Any one know how is that working ??
Sathy
|
|
|
|
|
Why don't you put a break point on the Page Load Event of one of those pages that are giving you error and step through the code to see what's causing it? Unless its a pure HTML page, in which case your message should not have been posted in the ASP.NET forum.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
DigiOz Multimedia wrote: Why don't you put a break point on the Page Load Event
It was not hitting ... The page was showing a 'runtime error' before even the init() event..
Sathy
|
|
|
|
|
Some common things you could check:
- Make sure your application is market to run as an application (not a simple folder).
- Check web.config file for any unusual keys or configuration setting.
- Check to make sure IIS is running the correct version of .NET, i.e. if your application is ASP.NET 2.0, make sure your IIS is not running 1.1 or 1.0.
- Make sure that the user under which your ASP.NET is running has read and execute permission to your application folder.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
DigiOz Multimedia wrote: Make sure your application is market to run as an application (not a simple folder).
Checked.
DigiOz Multimedia wrote: Check web.config file for any unusual keys or configuration setting
No unusual keys.
DigiOz Multimedia wrote: Check to make sure IIS is running the correct version of .NET, i.e. if your application is ASP.NET 2.0, make sure your IIS is not running 1.1 or 1.0.
Both my application and IIS are running under ASP .NET 2.0
DigiOz Multimedia wrote: Make sure that the user under which your ASP.NET is running has read and execute permission to your application folder
If this is the case then all the other pages in the site was working perfectly at the time when i was getting the 'runtime error' in clicking the hyper link for few pages.
Sathy
|
|
|
|
|
Hi,
I want a string which should be send to paypal and paypal returns the exact string to me.
like if i send paypal with all other option "chanu" it should return me "chanu" in ipn reply.
Regards,
|
|
|
|
|
Hi
Under custom parameter send the string which u want to retrieve.
Whatever string u send paypal will send the same string in return
in Ipn parameter.
Hope this help.
Regards
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
CODE UNDER ROW BOUND DATA IN GRIDVIEW
Button b = (Button)e.Row.FindControl("update");
if (b != null)
{
string str = ChangeDateFormat(DataBinder.Eval(e.Row.DataItem, "indate").ToString());
b.Attributes.Add("onclick", "return abc(" + str.ToString() + ");");
}
CODE IN THE JAVA SCRIPT FUNCTION
function abc(s)
{
alert(s);
return false;
}
Function Defenition
public string ChangeDateFormat(string t)
{
string dat = "";
DateTime datformat;
if (DateTime.TryParse(t, out datformat))
{
dat = datformat.ToString("dd/MM/yyyy");
return dat;
}
return dat;
}
now when i click at the upDATE BUTTON TO CHECK THE VALUE IT GIVES
6576576575757657657
ACTUALLY IT SHOULD GIVE THE DATE IN DD/MM/YYYY FORMAT 12/12/2000.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
How many times you will spam this same question sonia?
|
|
|
|
|
I want to provide Video conferencing facility and live chatting In my asp.net web application.
So is there any tools or SDK or components which I Use in my application.
It is very Urgent Can Anybody help me. Please
Raghvendra
Raghvendra Kumar Roy
|
|
|
|
|
You can try any third party controls
|
|
|
|