|
u can store the loginid in string and can pass it to entry form
and can retrive that value in constructor of entry form
rahul
|
|
|
|
|
Hi,
I have a problem concerning to application data, how to use and what to store.
I have application reports that are installed during application setup.
Inside my application, the users are able to run the reports and also to create new ones.
Now, I'm installing the reports in Application Data\AllUsers\..., and reports created by users, go to the same folder.
My question is: Is this the correct way to do this?
Should my installed reports go to Program Files\... (Application installation folder), and user created report to Application Data\All Users\...?
Does anyone knows best practices for this problem?
Thanks in advance.
NFLR
|
|
|
|
|
I don't think it really matters, in my 'Application Data' folder, apps store things like their settings, playlists, extra data they need etc. But ive also seen all of these things in a programs folder in 'Program Files'
I don't know what the 'Best Practice' is but, i think its OK to put the data in either place
|
|
|
|
|
string url="https://......./file.exe"
.............
try
{
WebClient myWebClient = new WebClient();
myWebClient.Credentials=CredentialCache.DefaultCredentials;
myWebClient.DownloadFile(url,path);
}
But server returns an error:(403) Forbidden
I think that I must to give a sertificate. But how can I do it in WebClient?
Thank you for answer.
|
|
|
|
|
|
You can also check out http://www.codeproject.com/useritems/filedownloader.asp[^].
You almost have things setup correctly, but the CredentailCache.DefaultCredentials will supply the request object with the default system credentials, not the username and password required by the web site.
In order to do that, you will need to do something like this:
Uri uri = new Uri(url);
CredentialCache credCache = new CredentialCache();
NetworkCredential userCred = new NetworkCredential(username, password, domain);
credCache.Add(uri, "Basic", userCred); The "NTLM" in the call is a string that specifies the authentication type. The valid choices are "NTLM", "Digest", and "Basic". You will need to use the type that is appropriate for your specific case.
Also, make sure that you don't need a proxy to be specified.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Hi,
I need to run some part of my code in a different security context. For eg. when i try to write to a remote share it throws access denied exception. but i have the username\pwd of that machine. Please help
James Poulose
|
|
|
|
|
Hi,
i am not able to fire xpath queries (SelectSingleNode method with namespace object) to a SOAP xml. It complains about a namespace problem. here is a sample
<soap:envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:body>
<setresponse xmlns="http://tempuri.org/">
<smessageid>EEF0AFFE-A9F5-41A2-AE82-4601E3E2465F
i want the data in the "sMessageID" element. Any idea??
James Poulose
|
|
|
|
|
Your XML snippet isn't visible. Please modify your post by either replacing all < with &lt; or check the "Ignore HTML tags in this message" option beneath the smilie selection. Furthermore it will be helpful to see XPath expression your currently using.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cookwww.troschuetz.de
|
|
|
|
|
So sorry for the inconvinience caused. Please find the xml below
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SetResponse xmlns="http://tempuri.org/">
<sMessageID>EEF0AFFE-A9F5-41A2-AE82-4601E3E2465F</sMessageID>
</SetResponse>
</soap:Body>
</soap:Envelope>
xpath i am trying to use the "sMessageID" element
/soap:Envelope/soap:Body/SetResponse/sMessageID
Regards,
James
|
|
|
|
|
I'm not sure, but I think the problem is that the SetResponse and sMessageID element are in the "http://tempuri.org/" namespace (defined as standard namespace without prefix) but this doesn't reflect in your XPath expression.
Try to use the SelectSingleNode overload that additionally takes a XmlNamespaceManager instance. Add entries for the pair (soap "http://schemas.xmlsoap.org/soap/envelope/") and (somePrefix "http://tempuri.org/") and use the somePrefix in your XPath: /soap:Envelope/soap:Body/somePrefix:SetResponse/somePrefix:sMessageID .
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
I have already done all the namespace mechanisms known to me.The problem is , if i add a namespace on my own, it should be applicable to all parts in the xpaths, not just the last couple of parts. I think, we need to find a way to specify that "soap" prefix is not a namespace and it is just an element name. Any way thanks for your reply
Regards,
James
|
|
|
|
|
I'm a current MCAD student. Hope someone can help me with a small query. I am working on an application that saves student records to an xml file. Through using an Xml Schema, a dataset generated from the xml schema, a new student row and the WriteXml method, I can save a new record to an xml file.
However, if I display an existing record to a series of textboxes and want to amend the record, how do I save the amended record back to the xml file. If I find a student row using the Student ID, populate the textboxes with the details, then use WriteXml method again, that saves a new record to the file instead of amending the existing records. I therefore conclude this is the wrong way of doing things so I am asking if anyone can point me in the right direction.
Is there another dataset method I should be using that I am not aware of to update an existing record. The NewStudentRow() method adds a new record, is there another method for updating?
Grateful for any help.
|
|
|
|
|
İs there any method taht convert all items in a string array to an int array
String[] --> int[] ???
karanba
|
|
|
|
|
try to convert string array items to integer and add it to int array one by one
int[0]=int.Parse(String[0]);
.
.
.
.
rahul
|
|
|
|
|
Check out the Array.ConvertAll<> method.
---
b { font-weight: normal; }
|
|
|
|
|
thank array.convert.all work fine for me
karanba
|
|
|
|
|
Hi,
When a network cable is plugged or unplugged from Lan card windows displays a message "LAN is now connected" or "Network cable is unplugged" in system tray. My question is how can i build an application which display such messages when a cable is unplugged from network card.
Thanx in advance.
Regards
Aamer
|
|
|
|
|
|
Hi,
I want to create a process using a user's login info. In managed C++ there is a "CreateProcessWithLogonW" function but I want to accomplish my task with managed code.
Is there any equavalent method for "CreateProcessWithLogonW"? How can I start a process using a logon info?
thanks,
- ferudun
|
|
|
|
|
Use an overload of Process.Start that takes an instance of ProcessStartInfo class which provides properties for logon information.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks for your reply but it is not clear to me which attributes of ProcessStarInfo has to be supplied with user's login name and password.
Simply, I need running a program with another user's privileges. When I use "runas" DOS command I am prompted to enter the user's password. That's the problem. I don't want to supply the password during runtime. I want the job to be done automatically.
thanks,
|
|
|
|
|
The properties are called UserName and Password . I saw right now that both are new in framework version 2.0 so that's probably the reason why you didn't find them. In case you're using a framework version prior 2.0, there's probably no managed way and you have to p/invoke the unmanaged function mentioned in your first post.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
thanks,
i am using 1.1
|
|
|
|
|
In case you don't already knew it, take a look at http://www.pinvoke.net[^]. It's a great help when you have to work with unmanaged apis.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|