|
hi guys,
I'd like some help and advice on how to create and modify a PPPOE conenction on windows Xp programatically.
To be specific..
I have an ASP.NET application that can be remotely called and be used to create a PPPOE connection or modify an existing one. Also, the ability to be able to activate/Deactivate said PPPOE connection during a reboot or any other programatically timed situations. The created connected/Disconnected PPPOE connection must appear in the my connections folder of windows xp.
I currently am using WMI System.Management class to manage my LAN conenctions, unfortunately i cant seem to make it handle and properly manage PPPOE connections.
I've tried using the RAS API, but from what i've learned it doesnt meet my needs. P-Creating a PPPOE Connection and then usign RAS to modif it seems... to elude me.. since i cants seem to figure out how to set the username and password of the connection..
I've figured maybe some registry configuration settings might help.. but i cant find the keys that represent the pppoe connections with its username and password.
any suggestions, sample code or even a knudge in the right direction would help.
Note: Its' not just connecting to a PPPOE server thats important, but also making sure it is saved and seen in the My network connections folder.
,thanks allen
|
|
|
|
|
hi,
plz help
i want to send array(string data ) data to other function
how can i send that data
plz give me sample code for that
|
|
|
|
|
public void DoSomething(string[] values) {
foreach (string value in values) {
Console.WriteLine(value);
}
}
DoSomething(new string[] { "A text line.", "Another line." });
---
b { font-weight: normal; }
|
|
|
|
|
alright, could you please explain these lines? :P
comments are fundamental...
|
|
|
|
|
What is it that you don't understand?
It's a method that accepts an array of strings as parameter, and it's a call to the method that creates an array of strings.
---
b { font-weight: normal; }
|
|
|
|
|
hmm.. it sounds clearly now... :]
|
|
|
|
|
hi
i have one array in one function .
that array i want send other function.
how can i send that array
plz modify the code i am new to programming.
in runtime iam getting that array .
DoSomething(new string[] { "A text line.", "Another line." });
Hi,
Thanks, if u think it's good.
otherwise sorry.
|
|
|
|
|
premkamalg wrote: DoSomething(new string[] { "A text line.", "Another line." });
this is just a different way to declare and initialize a string.
you could reach the same thing this way:
string[] strArr = new string[2];
string[0] = "a text line";
string[1] = "another line";
DoSomething(strArr);
clear now?
|
|
|
|
|
Hi all,
I have the following problem.
i send a sms to multiple cellnumbers by building a variable like so:
string _SmsTo = "http://sms.co.za/eapi/sub/send_sms/2/2.0?username=Whatever&password=BlahBlah&source_Id=1&message=Hi+Ma&msisdn=" + Convert.ToString(_SmsToNumber);
Now Here is the problem...
right after the "&msisdn=" part i allow the user to insert the numbers.... i store it in the Variable "_SmsToNumber", each number separated by a comma.
but now the variable "_SmsToNumber" gets very long... More than 2048 character long. Then when i run the url, it gives me a error... "System.Net.WebException: The Remote server returned an error:(414) Request URl to large."
Now: is there a way to say... if(_SmsToNumber.Length > 2000) then take only the first few numbers and then take only the first few numbers and send and then take another few numbers and send until all numbers a sent?
Sorry i know the questions might have some holes in it but i struggled to put into words what i am looking for.
Thank you in advance...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison(*
|
|
|
|
|
I do not know what you are doing but here I am trying to provide steps that are required.
String tempSmsNumber= "";<br />
while(_SmsToNumber.Length >0)<br />
{<br />
<br />
if (_SmsToNumber.Length > 2000)<br />
{<br />
tempSmsNumber =
_SmsToNumber =
}<br />
else<br />
{<br />
tempSmsNumber = SmsToNumber <br />
}<br />
}<br />
<br />
<br />
}
|
|
|
|
|
thank you.
I'll try and put this to use.
Enjoy ur day.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Have you considered the variable length of the message parameter (&message=Hi+Ma), and how this is going to affect the remaining length available to append the phone numbers?
The fundamental problem is the limit on the length of a URI (GET), look to see whether this service supports POST, where you will not have a limit.
|
|
|
|
|
What do you mean POST...
Is it possible to just throw a url out there and not care about a response? Because if it is, that might be one option... if that is what you mean by POST?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
ps...
I am using the following, if this might help...
HttpWebRequest Request;
StreamReader ResponseReader;
Request = ((HttpWebRequest)(WebRequest.Create(_SmsTo)));
ResponseReader = new StreamReader(Request.GetResponse().GetResponseStream());
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Ha, You were spot on....
i went on the sms providers help files and i came up with this...
"Please remember to URL-encode all parameters passed! Don't reinvent the wheel - rather use one of the countless libraries available. GET requests are allowed, but we strongly recommend using POST requests, especially if submitting a message to a large number of recipients (there can be limits on the size of GET requests)."
BUT how do i use the POST request in C#? and wat does it mean?
Thank You in advance...
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
hello,
I have the values m and n
and according to tham I want to create a graph.
how can I do this in C#?
p.s
I alreday have a the zedGraph component
|
|
|
|
|
Take a bitmap, draw on it and then show it in a picture box.
Bitmap bmp = new Bitmap(500, 500);
int y;
for(int x=0; x<100; x++)
{
y = m * x + n;
bmp.SetPixel(x, y, Color.Black);
}
myPictureBox.Image = bmp;
____________________________________
There is no proof for this sentence.
|
|
|
|
|
I took a look at the ZedGraph component and the article has all of the documentation in it to show how to graph your values.
RTFM
|
|
|
|
|
Hi, I have managed to create an xml file using c# and I can save it to the server no problem but I need to give the client the option of saving it where ever they want to put it so im just wondering if anyone has an idea of how to give the client the option of saving the xml file. Thanks in advance
Tim
|
|
|
|
|
Hi,
Can i know how your client is accessing the file?
Means what type of application is yours??????????
<marquee>nishu
|
|
|
|
|
Hello
Your question is a bit strange:
1- Your subject title is the name of the class you can use to do the task. What's your question?
2- You mentioned you are saving a file over a server? What about security?
Regards
|
|
|
|
|
at the moment the file is created in the asp.net/c# app by clicking a button and the xml file is saved to the root of the application
so i need to use a filedialog to give the client the option to save the file
as for security i have no experience of security so im afraid there is none for now anyway
|
|
|
|
|
Well, It'd be better if you show a treeview with the folders you want the user to be restricted to only, or make a textbox to write the relative path of the file to save. also you might want to check and validate the input in these fields before really creating the file on your server. Showing the entire folder tree of your server is like showing a "Hack me" dialog box!!
I aurge you to revise your security permissions, and other issues before allowing users to access and modify file system on your server.
Regards
|
|
|
|
|
ok thank you for your help
i have found one way of doin it
private void SaveFileToDesktop(string fileName, string fullFilePath, string fileContentType)
{
//*** check if the file exists
if (File.Exists(fullFilePath))
{
//*** create new file and get length
FileInfo iFile = new FileInfo(fullFilePath);
long fileLength = iFile.Length;
//***
Response.Clear();
Response.ContentType = fileContentType;
Response.AddHeader("Content-Length", fileLength.ToString());
Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName);
Response.WriteFile(fullFilePath);
Response.End();
}
}
but i will also take alook at the security side of things and advice about where to start learning about security
|
|
|
|
|
Hi
i want to put a rounded png image on the button.and button look no longer.
i also set the style of button to flat but it display a border how can i transaprent the border
|
|
|
|