|
Ditto. Is the CP forums your first search tool? GOOGLE IS YOUR FRIEND!
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Best way is to start yourself by Looking at this site
Think, work and accomplish
Thanks!
Develop2Program & Program2Develop
|
|
|
|
|
How will you create a login[user and administrator] form in asp.net with full coding?
|
|
|
|
|
Try the ASP.NET board[^].
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Check out this link[^]
And, as Mark said, next time use appropriate forum.
Regards,
Lev
|
|
|
|
|
senthil0505 wrote: How will you create a login
It depends on the context. I've never created a log in component the same way twice because on each project the requirements are different.
|
|
|
|
|
I'm running the following code:
StringBuilder sb = new StringBuilder();
byte[] buf = new byte[131072];
string url = null;
url = "http://google.com";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
if (request.HaveResponse)
{
Stream resStream = response.GetResponseStream();
string tempString = null;
int count = 0;
do
{
count = resStream.Read(buf, 0, buf.Length);
if (count != 0)
{
tempString = Encoding.ASCII.GetString(buf, 0, count);
sb.Append(tempString);
}
} while (count > 0);
}
richTextBox1.Text = sb.ToString();
and after code executed richTextBox1.Text contains the same code as I can see if I open in browser url and click on "view source".
But not always. There are some urls, that I can see server's replay in browser, and see html code in "view source", but richTextBox1.Text contains junk. May be there is some problem with page encoding or something?
Thanks.
|
|
|
|
|
What happens if you code your response stream handling as shown in the
example here[^] ?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
That is what:
Took the code from msdn page, compiled and here is what we have for the first itteration of the while loop:
in 'url', type string, variable:
http://capitalcity.combats.com/inf.pl?1183463649
in 'str' variable:
"�\b\0\0\0\0\0\0��[[s�F�~^���6$#�ąw��*�y7N\\�3����\t8\0(Y������/�h;���Q��le� J�!��y�JkO7�;eɒ�Q�2��>���9}Nw;�x��y_vqa�\n�������;����:F�L��V��*�9u;�����\\@�*^��Wu���F\vBE�� �[��R^t���\"�Y�˒�I���T,�4}K��*�:ҷ*8���m=Z�4�(Y�\\%-\v�!�\\�*(��e�#A8͡ª�jX�m{"
But when I do the same on http://google.com - everything is fine!
str variable contains readable html code.
Changing encoding to "windows-1251" instead of "utf-8" didn't help also.
Any ideas what's going wrong?
Thanks!
|
|
|
|
|
Font I guess? Maybe because it's a perl script?
|
|
|
|
|
The content returned from http://capitalcity.combats.com/inf.pl?1183463649
is compressed (gzip).
You may want to check the HttpWebResponse.ContentEncoding property
before assuming the HTTP content is text
Here's an example (first one I found Googling):
HttpWebRequest and GZip Http Responses[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks! That's exectly what I needed!
|
|
|
|
|
If I create a .net application is it fully compatible with a 64 bit OS or do I need to compile it specifically for this task?
I lack knowledge in this specific area and would gladly accept references...
|
|
|
|
|
See Jeffrey Richter's "CLR via C#" book
The target platform of the assembly is being controlled via /platform key of the compiler, here is the table of possible values and target assembly behavior depending on Windows version:
/platform x86 Windows x64 Windows IA64 Windows
----------------------------------------------------------------------------
anycpy exec. as 32bit app exec as 64bit app exec as 64bit app
x86 exec. as 32bit app exec as WoW64 app exec as WoW64 app
x64 does not exec. exec as 64bit app does not exec.
Itanium does not exec. does not exec. exec as 64bit app
To make it short, if you compile you app for "anycpu" it will run under 64bit framwork
Regards,
Lev
|
|
|
|
|
Thank you for the perfect answer .
|
|
|
|
|
you're welcome
Regards,
Lev
|
|
|
|
|
How to Access WMI From Server 2008 to Windows XP
How To Create remote Keystrokes Monitoring application Using asp.net with c#
|
|
|
|
|
priyapriyam wrote: How to Access WMI From Server 2008 to Windows XP
Did you tried by yourself?Where is your piece of code?
priyapriyam wrote: How To Create remote Keystrokes Monitoring application Using asp.net with c#
Do you want us to develop your applications?Lots projects available on net.
Cheers!!
Brij
|
|
|
|
|
First, noone is going to help you write a keylogger since they can so easily be used, and primarily ARE used, for nasty purposes. Second, you don't understand how ASP.NET works. It's impossible to write such an application using ASP.NET.
|
|
|
|
|
how can i find the checkbox is checked or not.....
present inside the datagridview...
send me sample coding..
|
|
|
|
|
Why crosspost.This won't help anybody instead of irritating..
Cheers!!
Brij
|
|
|
|
|
|
hi
Suppose you have gridview with one checkbox named CheckBox1.
You can find the checkbox control using the code
protected void Button1_Click(object sender, EventArgs e)
{
foreach (GridViewRow gvRow in GridView1.Rows)
{
CheckBox ch = (CheckBox)gvRow.FindControl("CheckBox1");
Response.Write(ch.Checked.ToString());
}
}
|
|
|
|
|
Hi All,
I am trying to test the success of WMI to check connectivity to a remote computer:
I have 2 computers:A,B Computer A: Windows Server 2008.Computer B: Windows XP SP2.They are all on the same network (a workgroup, not domain), with no firewalls in between (excepting Windows Firewall, which I have disabled on Computer B)
i wrote the following code.if local system means that code is working fine.Remotely means it show on Access Denied Error.How to Access WMI From Server 2008 to Windows XP.That remote connection Windows xp to Server 2008 Success.but Server 2008 to Windows Xp show on error like that access denied. Can Anyone help me?
Any help would be appreciated.
ConnectionOptions connection = new ConnectionOptions();
connection.EnablePrivileges = true;
ManagementScope scope = null;
//connection.Authority = "NTLMDomain:" + domain;
//connection.Username = userName;
//connection.Password = password;
//Local Machine
if (compName.ToUpper() == Environment.MachineName.ToUpper())
{
scope = new ManagementScope(@"\root\cimv2", connection);
}
else //Remote Machine
{
scope = new ManagementScope(@"\\" + compName + @"\root\cimv2", connection);
}
scope.Options.EnablePrivileges = true;
scope.Connect();
//
ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_OperatingSystem");
ManagementObjectSearcher objsearcher = new ManagementObjectSearcher(scope, query);
ManagementObjectCollection objcol = objsearcher.Get();
|
|
|
|
|
The account you run your app under has to have administrator permissions to each machine on the network you want to query. Or, you can supply appropriate credentials in the WMI connection code to do the same thing.
|
|
|
|