|
hi all,
I am pretty new to this topic. i am developing a windows application using C# in which i need to call a mobile number when i enter the mobile number in a textbox.
How can i do it? i tried searching the google and found some examples in vb using mscomm control which did not work in .NET (as for me).
can anybody point me to some samples or suggest any ideas?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
visit this site http://www.tapiex.com i use it's librarry it was very useful
|
|
|
|
|
I found some examples(terminalcontrolproject and minimalisticTelnet) to connect to telnet from c#.net and execute the commands.
But my requirement is --Dynamically I know the IP to whihc i should connect through telnet and I have some commands to execute on that (remote system)IP
All these should happen at backend i.e., terminal should not be visible
minimalisticTelnet example nearer to my requirement but it is giving exceptions that i posted.
Please suggest me on this urgent
PraveenKumar Palla
|
|
|
|
|
praveenkumar palla wrote: Please suggest me on this urgent
They're all urgent. You won't get much of a response that way. You certainly won't get much if you don't describe, or include the exceptions you are encountering, or links to the examples you reference.
only two letters away from being an asset
|
|
|
|
|
This is the reference
http://www.codeproject.com/cs/internet/MinimalisticTelnet.asp?forumid=425724&select=2233796&df=100&msg=2233796
exception is
"Failed to connect : no password prompt"
I am able to connect with same IP login and password from cmd.exe
Thanks for the reply
|
|
|
|
|
Well then the person probably best able to answer this is the author.
only two letters away from being an asset
|
|
|
|
|
|
Hi,
I have developed one windows service application using C# 2.0.
I have class for read and write value in INI File. In INI file I have storing the database path.
I need to get the path value in windows service class. So I have used the following function for read and write the value in INI File.
[DllImport("kernel32")]
public static extern long WritePrivateProfileString(string SectionName, string KeyName, string Value, string FileName);
[DllImport("kernel32")]
public static extern int GetPrivateProfileString(string SectionName, string KeyName, string DefaultValue, StringBuilder Value, int Size, string FileName);
I called this function in start service
public void StartPPdbService()
{
// Get DB path
StringBuilder tmpPath = new StringBuilder(255);
try
{
MyWin32.GetPrivateProfileString("PPdb", "path", ".\\DB\\", tmpPath, 255, Gen.IniName);
PPGen.DBpath = tmpPath.ToString();
if (!PPGen.DBpath.EndsWith("\\"))
{
PPGen.DBpath += "\\";
}
}
catch (Exception e)
{
// Insert Open in db log
PPGen.Log("DB", e.Message.ToString(), Visible);
}
finally
{
// Insert Open in db log
PPGen.Log("db", PPGen.DBpath.ToString(), Visible);
}
}
The above code return only default value not in INI file value.
Thank you,
Best regards,
Sundar
B.Sundarapandian
|
|
|
|
|
If you are using 2.0 then you should use app.cofig, not antiquated techniques like ini files.
only two letters away from being an asset
|
|
|
|
|
Hi Mr.
Thank you for the reply.
My application already have version of 3. Now I making the enhancement. already they did in console application. Now I make a windows service as well as console application.
We can able to run a windows service application as a Console application.
So I need to use the same way of storing process of INI file.
Thank you,
best regards,
B.Sundarapandian
|
|
|
|
|
Hi
I am new to ASP.Net.I have created a file system based web application.I tried to view it in browser.I can do so when i do http://localhost:portno/<project name="">.However I cannot view it when i do http://<computername>:portno/<project name="">.I cant unserstand where the problem is.I have placed the project inside wwwroot and have webshared it well.I have allowed it in network sharing too.Another thing that is confusing me is when i dont give the port no that is http:/<computer name="">/<project name=""> it shows me the directory listing of tegh project .But when i click on any of the aspx page,the following error is shown in the browser:
"The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://jeri/joint/Default.aspx'. Line 1, Position...
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
-^"
Please help! I know very little about IIS settings and all.Thanks in advance!!
confusedme
|
|
|
|
|
hi
if i understand your question you want to browse your website on Lan the way is to add the file system web site to vertual directory you can do it like this:
open control panel --> adminstrative tools --> IIS
when you open it look at left side of the window and right click on web site default in web sites in your local computer tree.
on the right menu choose new --> virtual directory that will launch wizard
. alias name will be the website name
. in the browse window put your project folder
. in the permision put what you see necessary
and now you can see your website like this
http://localhost/'your web site name'
or if you are o lan any one can write your ip/'site name' and he will see your web site
. it's not necessary to put your file system project in wwwroot folder and this is one of it's benefit
gain i hope i understand your question
have nice day
|
|
|
|
|
hi there!Thanks for the reply!!
I did wat u said.Now i can see the directory listing when i do http://localhost/mywebsitename in my computer.But when i click on any of the pages of the directory the message is like:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://localhost/joint/Default.aspx'. Line 1, Pos...
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
-^
And i cant see even the directory listing in my LAN when i do http://ipadd//mywebsite or http://ipadd//aliasname.It says page cant be displayed.
Please help!
confusedme
|
|
|
|
|
confusedme wrote: I can do so when i do http://localhost:portno/.However I cannot view it when i do http://:portno/
Of course it doesn't work. http://:portNumber isn't a valid URL. You didn't tell the browser which host to connect to to request the page. If you specify a port number you must specify the host, either by name or IP.
|
|
|
|
|
thanks for the reply..There was some kind of typing error in that .Of course i gave the servername...it was like this:
I can do so when i do http://localhost:portno/project name.However I cannot view it when i do http://hostname:portno/project name.I want to run it in LAN.Please Help!
confusedme
|
|
|
|
|
I'm doing a C# application and want to do some unit testing on some of the stuff using NUNit.
I'm having problems with a test method. The test method is as follows:
<br />
[Test]<br />
public void TestGetBlacklistByGirl()<br />
{<br />
List<string> list = new List<string>();<br />
list.Add("bing");<br />
list.Add("ht7");<br />
list.Add("rohde"); <br />
BlacklistDetails testObject = new BlacklistDetails(12, list);<br />
<br />
BlacklistDetails returnObject = BlacklistProvider.Instance.GetBlacklistByGirl(12); <br />
<br />
<br />
}<br />
Even though the Assert is commented out, NUnit reports an error at the line above - specifically with the Instance property which is:
<br />
static public BlacklistProvider Instance<br />
{<br />
get<br />
{<br />
if (instance == null)<br />
{<br />
instance = (BlacklistProvider)Activator.CreateInstance(<br />
Type.GetType(RSDConfiguration.BlacklistProvider));<br />
}<br />
return instance;<br />
}<br />
}<br />
When using the method outside NUnit it works as expected, but NUnit has a problem with it. I have no idea why NUnit complaints about it -- it's just a normal property, and it works fine.
Any ideas?
"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
-Atlas Shrugged, Ayn Rand
|
|
|
|
|
What error is it throwing out?
I'm not really sure but it could be that NUnit doesn't find some files. I had something similar when NUnit didn't find some configuration file. To test this just copy everything needed into the bin folder of NUnit. If it works afterwards you will have to find out which file is the problem and try to work around it (copying all files to the NUnit directory shouldn't be your long term solution ).
Robert
|
|
|
|
|
Hi Robert Rohde (nice surname you've got there )
Yup, that was the problem.
My web.config was the problem. NUnit couldn't find it. Anyway, I've fixed it now. Thanks for the reply
"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
-Atlas Shrugged, Ayn Rand
|
|
|
|
|
if i try...
ArrayList List=new ArrayList();
int i=0;
while(true)
{
List.Add(i);
i++;
}
When does the ArrayList crash? or it's never happened?
|
|
|
|
|
Provided there is no limit placed by the programmer on the ArrayList size then - since ArrayLists hold objects (value types are boxed) - the capacity of your ArrayList is governed by the size and number of objects you are holding, which in turn is governed by the heap size of your computer.
--
Cheers,
Gary
http://www.garyshort.org
|
|
|
|
|
The limits are int.MaxValue items or when you get an OutOfMemory exception, whichever comes first.
|
|
|
|
|
I've a project about socket and have some trouble....
I've create a serverSocket on port 80 of a server : (IPserver,80)
And then create a clientSocket on port 80 of some clients: (IPclients,80)
So i need a code to do
First I've created a serverSocket and listening communicate from clientSocket (done)
Second I need a code on clientSocket to do
0. Create clientSocket
1. Connect to serverSocket
2. To do something..
3. Disconnect
4. Sleep and wait
5. Connect to serverSocket
6. To do something..
7. Disconnect
8. Destroy clientSocket
I don't know how to code method Create clientSocket, method Connect to serverSocket, method Disconnect.
Anyway thanks for your reply
Le Trung Hieu
|
|
|
|
|
You should start off by examining the System.Net namespace in the .Net framework. Then if you have a specific question post it here.
--
Cheers,
Gary
http://www.garyshort.org
|
|
|
|
|
Hi
create two ports which should be available in network
one is for listening and one is for recieving
that means listner port will be the receiver port in another side
and vice versa
then inside the listen method use the start method and send method
inside the reciever method use the start method and recieve method of socket
..after that use stop method or close method in connectin close
Hope u have got some fair idea from this.Lots of examples are their in code project...
Regards
DilipRam
|
|
|
|
|
Thanks for your help.
But I only use one port(80).
Le Trung Hieu
|
|
|
|