|
Hi all,
I want to know how can i encrypt the whole XML file, it means that the data inside this file can't be understood with any user if he try to open this file (Ex.112364896fgdf64965)
if anyone know please help me
|
|
|
|
|
Take a look at the System.Security.Cryptography namespace.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
i saw this namespace and i didn't found what i want , it makes only encryption for XMLElements and i want to incrypt the whole file to be in octet stream
Thanks for your help
|
|
|
|
|
There is no special method for encrypting an xml document. Just get the xml document as a string, and encrypt it.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks alot for your help
|
|
|
|
|
i am working with c# console application.i am using MInternetExplorer.Explorer class of SHocVw.dll.basically i am parsing html pages.i am using following events as per my requirement
BeforeNavigate2()
DocumentComplete()
i would like to resolve the IP address of website.i used the following code for resolving IP Address
IPHostEntry IPHost =Dns.Resolve("http://www.yahoo.com");
// after that code is not executing
IPAddress[] addr=IPHost.AddressList;
for(int i= 0; i
|
|
|
|
|
Amit_CDAC_Grover wrote: Dns.Resolve("http://www.yahoo.com");
Hostnames do not include the http:// part.
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
i have also tried with Dns.Resolve("www.yahoo.com") but that is also not working.
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
This code runs fine on my machine
IPHostEntry entry = Dns.Resolve("www.google.com");
Console.WriteLine(entry.AddressList[0].ToString());
Does your computer have a DNS server configured? When you ping www.yahoo.com, do you see the IP Address in the response?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
no i don'nt have DNS server configured on my system. what should i do in order to configure DNS server
Amit Grover
CDAC R&D
Gist Group
pune
|
|
|
|
|
Amit_CDAC_Grover wrote: no i don'nt have DNS server configured on my system.
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
Open a CMD prompt and type ipconfig /all and see what you get. Down near the bottom of what comes up, it should list at least one DNS Server IP address.
Any DNS setup information has to come from your ISP.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i am working on a project in which i'm dealing with business layer and data layer where business layer has a reference of data layer. when business layer call a function of data layer sending ref object variable as parameter
function signature in data layer is:
"public bool add(ref object objagent)"
this ref object variable is actually an instance of business layer class,
but when i proceed with function assigning values like:
string stragentname;
stragentname=objagent.agentname;
upon complilation it gives me error:"object doesnot contain a definition for agentname"
|
|
|
|
|
That's because you are passing the thing as an object, instead of whatever type it really is. Your method signature should probably be something like this:
public bool Add( Agent agent )
{
string agentName = agent.agentName;
...
}
From what you've shown, there is no need to have the ref keyword in there.
Also, you don't need Hungarian notation with C#.
Matt Gerrans
|
|
|
|
|
thanks Matt
but i can not declare Agent type in this function, because it is defined in data layer that do not have reference of business layer. therefore, i have to declare object type.
|
|
|
|
|
If you can't reference the class, then you can't do anything with it (unless you use reflection).
If you don't want the data layer to know the business class, then make an interface with the properties you want to expose, and make the business class implement it, and reference the interface in the data layer.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa's suggestion is probably the way you should go.
Another quick-and-dirty option, if Add() only needs a few things, is to use parameters. For example:
Add( string agentName, int agentId );
Another one that's even more of a hack is to pass an attribute/value Hashtable.
Matt Gerrans
|
|
|
|
|
i am just starting out with using microsoft visual c# and have made a browser window to use as a client for a web based game everything works as expected besides one thing....
when you click the play button for the game... it opens a new window... i am looking for a simple way to over ride this and make it open in the program window.... if i right click the link and click open link it opens the way i want it to....
but i think the developers have embedded the code into the page causing it to open in a new window....
if anyone would be willing to help me i have msn at voxcustoms@hotmail.com and i can send you the project... i would appreciate any and all help i could get.... i am starting to get discouraged with this... i have looked at about 100 different pages and havent been able to find it on the web since i have no idea what most of it is talking about....
thank you in advance....
Nathan
|
|
|
|
|
Hello There,
I am working with c# & I have used two textbox server control.
1> Registration Date
2> Expiry Date
First of all, user enters value for the first textbox namely Registration Date and then the expiry date should be auto calculated by adding 30 days into currently entered registration date when he user leaves the first textbox.
That means there are two textboxes - user enters the value for first textbox and the second textbox should be auto calcuated on lost focus event of first textbox.
So pls let me know..... Waiting for your answer....
Thanks,
Paresh
|
|
|
|
|
textbox2.Text = DateTime.Parse(textbox1.Text).AddDays(30).ToString();
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
Ok here i am again the CP having hit my head on the wall as much as possible for this 2 days...
It was more that 1 year i didn't do anything in C#...
now after a lot of ice on my head i got it, my CDAWG
(Word here is a byte pointer)
the class is finally working, it takes imput strings, convert them to bytes and fill the tree... it's very unsafe.... i use ** and * with a clas for the heap memory allocation taken from the examples of the msdn very short code and always worked fine.
What can i do now???
that's what i did, i took the wikipedia dump file with all their articles names, one per line.1471780 witout the jap ones (but the class would work ok anyway, even with jap thanks to byte representation)
it's 25Mb of a text that have an article name per line...
cool i'm loading it into my class.. and it does the insertion quite faster then what i thought.
the test on word are just WOW.. i mean... almost "instant"
but now the stuff is... why does it take 130Mb of Memory? shoudn't the tree be
"Compact"?
What i wanted to know is if any of you may tell me if this result is "normal"
should a 25Mb file made with one word per line take up to 130Mb when loaded into an normal CDAWG???
<- true inside to understand outside ->
-- modified at 0:28 Thursday 20th October, 2005
|
|
|
|
|
1:5 is not a bad ratio for a datastructure like a graph.
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
hi..
Anyone there able to help me?? I'm currently doing a project on C# web application.. But somehow, i was totally new to this software. My problem is that i have design a user log in interface.. BUT i need to check whether my password and username is it key in correctly.. If it is right, it'll go to the next page and if it is key in wrongly it will prompt out a error message. I have design out the web page and now i'n unsure about the code which i need to put in.. What do i need to type in my Login button so i can check whether my password and username is type correctly?? I need to check through SQL database.. It goes something like that:
private void BLogin_Click(object sender, System.EventArgs e)
{
}
thankz =)
Cheese_kid =p
|
|
|
|
|
using System.Data.SqlClient;
....
private void BLogin_Click(object sender, System.EventArgs e)
{
SqlConnection conn=new SqlConnection(YourConnectionString);
string strSql="select count(*) from UserTable where UserName=@UserName and PassWord=@PassWord";
SqlCommand command=new SqlCommand(strSql,conn);
command.Parameters.Add("@UserName", SqlDbType.NVarChar,50);
command.Parameters["@UserName"].Value=UserName;
command.Parameters.Add("@PassWord", SqlDbType.NVarChar,50);
command.Parameters["@PassWord"].Value=PassWord;
if(int.Parse(command.ExecuteScalar().ToString())>=1)
{
//exist,successful;
}
else
{
//not exist,failed!
}
}
|
|
|
|
|
Hi...
there's some problems going on that i need your help again:
SqlConnection conn=new SqlConnection(YourConnectionString);
(YourConnectionString) means the SQL database file is it?? and the command.Parameter is it used to pass in the value we key in??
Cheese_kid =p
|
|
|
|
|