|
You haven't mentioned the web server you are using. It could be either IUSR_MachineName or ASPNET. I guess for local dev server (Cassini), the user account is ASPNET.
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
Can we pass viewstate data on another page.If yes,How?
|
|
|
|
|
Wrong forum - this should be in the ASP.NET forum, but seeing I'm in a relatively good mood, I'll answer this one. No you can't. Viewstate is used to recreate a page, and would be meaningless in the context of another page.
|
|
|
|
|
Viewstate is for the page only you can pass in another page by querystring or using session/application varaiable etc.
Cheers!!
Brij
|
|
|
|
|
I'd like to write a method for a logging class (yes I know - yet another one) that has this functionality:
Log.LogArgs(params object[] args)
{
... reflection magic here ...
}
Usage:
int x = 5;
String y = "banana";
Log.LogArgs(x,y);
Produces (in log somewhere or as a returned string or something) this:
"Arg0=(x,Int32,5),Arg1=(y,String,banana)";
I can get the "Int32" and "5", but need some Reflection 'Hocus pocus'.
Suggestions?
|
|
|
|
|
Parameters don't have explicit names in the IL as far as I know. You might want to take a look at the CallStack class - which will let you get the line and file info of the calling method (from the PDB - if it exists). Otherwise I suspect you are kinda boned.
|
|
|
|
|
It is not possible to get the name of the variables through reflection.
I would not expect to ever see a reflection framework that allows you to do this. To pass that kind of information around from function call to function call would be way to much overhead for a practical system.
|
|
|
|
|
Yes, that makes sense to me, but C# magic has surprised me before and I thought there might be some decoration or something that 'would' tell the IL to pass that information for this method alone. (Even if it requires the pdb).
Thanks for your reply.
|
|
|
|
|
On top of that, it would add considerable overhead to the execution of your app. Reflection is not a fast operation.
|
|
|
|
|
Hi,
I'm getting a very weird error message whenever I try to add a Windows Form to my project.
The new form is added, but when I try to add anything to it (buttons, labels) I get a "File exists" error that won't let me save. I have .Net 2008.
Has anybody had a similar problem?
thanx
|
|
|
|
|
Possibly you are using a name for the form that already exists as a file (but not in the project?) Try using a different name.
Is the project in source control? Perhaps there is a file with that name in source control that you haven't synced up with yet?
Simon
|
|
|
|
|
Hi,
I would like know whether there is a possibility using Powershell we can run application with Admin credentials without elevating prompt for Admin password.
jhghjghj
|
|
|
|
|
No[^]. There is no way to prevent the UAC prompts from happening.
The user can disable them, but that is their choice. You cannot just have them disabled for your application. However you start it, powershell or not.
Simon
|
|
|
|
|
Application-level UAC control isn't going to show up until Windows 7, even then, it's not guaranteed it's going to happen. Microsoft is currently "looking into it".
|
|
|
|
|
I have a bit of hardware that has the strange requirement that all access to it must occur on the same thread that it was initialised on.
(Kind of like GUI controls do)
What I'm looking for is a way of creating a thread and then making sure that any methods that access the hardware get transferred to run on that thread.
I tried creating a thread and creating a dispatcher[^] for the thread, but as soon as the thread has no more work to do, it stops. But if I keep the thread alive by doing an idle loop and some sleeps, the methods queued on the dispatcher never get processed. Is there some way I can keep a thread idle and get it to process it's dispatcher queue when something gets added.
Or is there another class that I can use to archive this?
I could write my own, A simple list<Action> that the methods could be added to, and a thread that just loops round, executes the actions and removes them from the list.
(I don't need code samples, or urgent codez , just a few pointers if anything like this already exists in the framework, or if I should just write my own)
Simon
|
|
|
|
|
Simon Stevens wrote: that has the strange requirement that all access to it must occur on the same thread that it was initialised on.
That's not strange at all. It's basic threading 101.[^] If you intend to get involved in threading I suggest you don't take it lightly. In my experience, those that do meet with many failures. You should prefer to immerse yourself in the study of the subject. This entails much reading and research coding to get hands on experience of how things work. Then when you feel you actually understand the subject, and only then, would you attempt a production project.
led mike
|
|
|
|
|
I understand threading.
All I was wondering was if there was an existing set of classes in .net that provided the ability to queue jobs for a specific thread, or if I needed to write my own.
Simon
|
|
|
|
|
Simon Stevens wrote: I understand threading.
That is not evident in your original post.
led mike
|
|
|
|
|
My apologies, next time I post a question I'll include a link to my CV, list of achievements, and areas of knowledge.
Anyway, thanks for all the help led mike.
Simon
|
|
|
|
|
Simon Stevens wrote: if I keep the thread alive by doing an idle loop and some sleeps
Simon Stevens wrote: . Is there some way I can keep a thread idle and get it to process it's dispatcher queue
Waiting on an event works well.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks. I'll give this a try.
Simon
|
|
|
|
|
Hi,
Is “windowsbase.dll” part of any of the version of .net framework? I have googled it lot but unable to find proper answer, can anyone please tell me about that.
Thanks,
Mushq
|
|
|
|
|
It looks like .NET 3.0+ as far as I can tell.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks.
Regards,
Mushq
|
|
|
|
|
It's .NET 3.0 and above. Why would you need to reference this .DLL anyway??
|
|
|
|