|
From a server point of view, as long as the proxy is working, it should be transparent. But I suspect you wont be able to use TCPClient from the client, but rather WebClient or HttpWebRequest.
|
|
|
|
|
Yes it is possible as far as ur server contail real IP. Doesn't metter where is the client.
regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
can anyone help me to read the nodes and values of a XML to a multidimensional array.there is only single parent node for my xml page.
Vipin
|
|
|
|
|
We cannot help you, if we don't know the XML file.
We must see it first.
|
|
|
|
|
using(System.IO.StreamReader sr = new System.IO.StreamReader(temp_path))
{
//没有到达文件结尾时一直读取文件
while(sr.Peek() > 0)
{
//读出一行文本
string temp_string = sr.ReadLine();
//进行编码转换,原ASCI码转换成Unicode编码
Here how to do? I tried two days but no good^^
//连接到输出文件内容中
file_context += temp_string + " ";
}
}
|
|
|
|
|
using(System.IO.StreamReader sr = new System.IO.StreamReader(temp_path))
{
//没有到达文件结尾时一直读取文件
while(sr.Peek() > 0)
{
//读出一行文本
string temp_string = sr.ReadLine();
//convert ASCII to Unicode
Here how to do? I tried two days but no good^^
//连接到输出文件内容中
file_context += temp_string + "
";
}
}
|
|
|
|
|
How to do what?
If I venture to do a guess, you are trying to read a file using a specific encoding? Then you just have to specify the encoding when you create the StreamReader.
You don't have to use Peek. Just use ReadLine until it returns null.
---
b { font-weight: normal; }
|
|
|
|
|
the source txt file is encodeing with ASCII
i want to display it...with Unicode not ASCII(98 97 25 20....)
|
|
|
|
|
Then specify the ASCII encoding when you open the StreamReader.
---
b { font-weight: normal; }
|
|
|
|
|
Then specify the ASCII encoding when you open the StreamReader.
how to do this?
sr.CurrentEncoding??
|
|
|
|
|
new System.IO.StreamReader(temp_path, Encoding.ASCII)
---
b { font-weight: normal; }
|
|
|
|
|
The 'guess' is on
|
|
|
|
|
the source file(.txt) is encoding with ASCII
i need read this file and display it in a web page
|
|
|
|
|
634768511 601989262 ˵(2005-07-09 18:42:55)Ϊ˱֤MM˵İȫ뱣ܡ鿴QQ502278472ĸ֪ô
634768511 601989262 ˵(2005-07-09 18:42:55)Ϊ˱֤MM˵İȫ뱣ܡ鿴QQ502278472ĸ֪ô
now i see this,see??
|
|
|
|
|
rainfeet wrote: file_context += temp_string + "
";
Either do:
file_context += temp_string + @"
";
-or-
file_context += temp_string + Environment.NewLine;
|
|
|
|
|
3Q
|
|
|
|
|
there are two ways to slove this problem.
first is that after you read the bytes,then you convert it to unicode :
string temp_string = sr.ReadLine();
// Create two different encodings.
Encoding ascii = Encoding.ASCII;
Encoding unicode = Encoding.Unicode;
// Convert the string into a byte[].
byte[] assciiBytes = unicode.GetBytes(temp_string );
// Perform the conversion from one encoding to the other.
byte[] unicodeBytes = Encoding.Convert(unicode, ascii, assciiBytes );
the second is that initalize the StreamReader with unicode:
using(System.IO.StreamReader sr = new System.IO.StreamReader(temp_path, Encoding.Unicode))
{
}
Just do it!
|
|
|
|
|
i am sorry to tell you
634768511 ?? 601989262 ??(2005-07-09 18:42:55)????????????????????????????????????
i see this
|
|
|
|
|
Please guide me in the following scenario
I am developing c# application using Visual Studio 2005. I want that when the user executes my application then:
1- The window should create a new Virtual desktop using MSVD.
2- My application should run in the new desktop. Only my application should be allowed to run.
3- I should have the options to modify the start menu in the new virtual desktop
4- When user close application the virtual desktop should shutdown
How can I achieve this?
I will be very thankful.
|
|
|
|
|
Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
What could be the reason for the error.
where there is a will there is a way
|
|
|
|
|
This error may occurs when the object is not inilized.
Use this:
myClass myObject = new myClass();
OR
myClass myObject = null;
myObject = new myClass();
|
|
|
|
|
ZeeshanAhmedpk wrote: myClass myObject = null;
myObject = new myClass();
Why this?
|
|
|
|
|
Its null reference because you havent instantiated or assigned to an instance.
Why it throws an exception is because you using even though it is null reference.
Hope this answers your question..
.NET Rules
|
|
|
|
|
myObject = new myClass();
But you have assigned myObject to an instance...
|
|
|
|
|
Hi..
The exception only get thrown were you use the null reference, can you post the code, and give the line num that tthrows the exception.
Maybe we can see what you really trying to do.
.NET Rules
|
|
|
|