|
Thanks for your reply.
But actually I am setting value string using textbox.text, so this solution is not relevant here, problem here is setting up of edit buffer, which I am not getting right.
|
|
|
|
|
Hi,
I am using the following code to decrypt an array of bytes:
DESCryptoServiceProvider des=new DESCryptoServiceProvider();
des.BlockSize=blockSize;
des.Key=kDESKey;
des.KeySize=64;
des.Padding=PaddingMode.PKCS7;
des.Mode=CipherMode.ECB;
ICryptoTransform cryptoTransform=des.CreateDecryptor();
MemoryStream mem=new MemoryStream(cipherTextBytes);
CryptoStream cryptoStream=new CryptoStream(mem,cryptoTransform,CryptoStreamMode.Read);
byte[] outputBuffer=new byte[cipherTextBytes.Length];
cryptoStream.Read(outputBuffer,0,outputBuffer.Length);
mem.Close();
cryptoStream.Close();
return outputBuffer;
But the problem is that when i call Read of the cryptoStream, i get System.Cryptography.CryptographicException with the message of "Bad Data". Basically above code is the part of a web service. I am not concerned with the above code. I just want to provide some security feature to my web service. If it can be done through some other easy way, that's also welcome.
Please guide me in this regard...
Wasif Ehsan.
|
|
|
|
|
Hi
I have a Type object which is of type "System.Int32[]" to "System.Int32". I know theres makearraytype(), but how do I do it the other way?
cheers
|
|
|
|
|
What's the point of merging an array of ints into a single int? That makes little sense.
Tell us what you're trying to achieve
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Well the type wouldn't always be an int. That was an example (sorry if I wasn't too clear). Basically I'm getting the parameter of a function through reflection (which will be an array of some Type t) and then casting an Object array to Type t, which I'm told means I need to convert each item individually.
cheers
|
|
|
|
|
|
Hey!
I am having some problem to get the Visual Source Safe 2005 to work over the Internet.
I am using my own computer as web server, this computer runs Windows XP pro.
This is the steps I take:
Create database:
1. Creates a dir on my G drive(G:\SourceSafe).
2. Starts VSS 2005 Administrator
3. File > Open Databas
4. Add > Create a new database
5. Then I browse to my G drive and locate the directory (G:\SourceSafe).
6. Source safe database is now created.
Settings:
1. Starts VSS 2005 Administrator
2. Server > Configure
3. Checks the “Enable SourceSafe Internet for this computer”
Create User:
1. Users > Add User
2. And then I create a user with password
No I open the IIS and brows down to standard webplace. Here I find the SourceSafe created by the VSS 2005 Administrator. It contains the following folders: Data, temp and users, it also contains the files srcsafe.ini and users.txt.
Connect the client:
I am using my own computer again to connect to my web server(my computer).
1. Open Visual Studio 2005
2. Tools > Options > Source Control
3. Choose Microsoft Visual SourceSafe (Internet) from the dropdown box. OK
4. File > Open > WebSite(in this case, have also tried Project/Solution)
5. Choose Source Control > Select Source Control Poject
6. A Open Source Database shows and I choose Add
7. A Wizard starts > Next
8. No I am prompted to enter Address(http(s)://) and folder.
9. I use http://www.myip.dk/ to get my external web adr and enter it in the Address field.
10. My Folder would be SourceSafe.
When I press next I get a Windows standard login window, with name and password. Here I enter the user I created in “Create User:”, but it will not grant me?
I have tried to disabled the local firewall and I have also disabled the router(3com) firewall and placed my computer in DMZ zone just to be sure that none of them is the problem.
What am I doing wrong?
www.znize.se/jimmy
|
|
|
|
|
Hi all.
Can anyb one guide me how to implement an authentication and Authorization application.Authorization is more important.
|
|
|
|
|
I assume this is ASP.NET.
MS has a wonderful book on this subject in their Patterns and Practices section. It's a downloadable PDF, about 500 pages (IIRC).
|
|
|
|
|
Hi leppie.
I want to implement on "Windows application"
|
|
|
|
|
Saeed Rezaey wrote: Authorization is more important.
u can implement Authorization by creating Users (and provide them passwords) and their roles. Based on roles u can authorize a user in windows applications.
Best regards,
|
|
|
|
|
Hi All,
I created a Class library in windows C#)with some methods.. I want to expose this as Web service for other applications...How can i generate the Web service for window's class library(.dll)
Best Regards
Arun Kumar Babu
|
|
|
|
|
I suppose System.Web.Hosting.ApplicationHost.CreateApplicationHost() would be a good start, unfortunately I have never done it myself
|
|
|
|
|
I created a Business Component which does some services..I want that thing to be consumed by any appliaction viw Web service.,So tell me how to convert my business component(A dll file to web service,,i want to create a proxy)
|
|
|
|
|
Arun Kumar Babu wrote: So tell me how to convert my business component
As I told you look at the application hosting of ASP.NET as you will need that to start, and as I said, from there I dont know, because I havent tried it.
If you have a specific problem, later on, we can try help you further.
|
|
|
|
|
how can we programatically add a new file to the project's solution in c#.net
pavithra D
|
|
|
|
|
Just edit your .csproj file.
Use XmlDocument to edit it.
Find "Include" Node and add "File" Node to it.
|
|
|
|
|
Hi,
I'm using WebBrowser control of VS.NET 2005.
I have handled the Navigate event of this control but I don't know how to get the data on the request object before it is sent to server.
Thanks for any help!
Hung
|
|
|
|
|
i cant get your mean!! but i think this code may help you.
change the property Url to about:blank
drop a button to form1 (leave the button1 as name)
bouble click on the button1 and paste following code as event handler
private void button1_Click(object sender, EventArgs e)
{
System.IO.MemoryStream st = new System.IO.MemoryStream ();
string sampleHtml = "Hello world! ";
UTF8Encoding uniEncoding = new UTF8Encoding();
byte[] firstString = uniEncoding.GetBytes(sampleHtml);
webBrowser1.DocumentStream = st;
st.Write(firstString, 0, firstString.Length);
st.Flush();
st.Position = 0;
webBrowser1.DocumentStream = st;
}
|
|
|
|
|
Thank nafiseh_salmani, but the Document.Stream just get the source of HTML Page not a data on a request send to server.
I mean that:
I have a HTML page and it have some javascript function, this script will send request to server when the form is loading.
Now I want to manage all the request send to server because I want to change somethings on this request.
If I use VB.NET code to manage all requests, how can I do?
Thanks for your help!
Hung
|
|
|
|
|
is there a way of manging\creating Memory mapped files in c#?
i need to load a Big >200MB file into mmf and manipulte it .
Thanks
Have a nice Day
|
|
|
|
|
An application(asp.net(.net2)) generating reports using
crystal report is published and accessed over a link.After using
the link and generating reports for a while,reports are not not generated further.
Is this having anything to do with crystal report registration,memory problems(dataset is used) or something else???
|
|
|
|
|
Hi All,
May i know how to connect and use a blueTooth adaptor to send out images to handphone using C# codes in visual studio 2005. thankx.
|
|
|
|
|
AFAIK, Bluetooth devices can be used pretty much as serial ports. You should see in your system properties if your bluetooth device, once installed, creates something like a virtual COM port, which you can use with the class SerialPort in .NET framework 2.0.
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
I have created text on a tabpage by using graphic object.
g = tabPage1.CreateGraphics();
g.DrawString(text, fnt, brsh, x, y);
g.Dispose();
Labels were used before instead and the tabPage was scrollable (tabPage.AutoScroll = true). But now, after changing labels to graphic objects, the tabpage is not scrollable any more and thus causes missing text. Also, whenever the splitter is moved, the existing text on the tabPage disappeared and the tabPage becomes blank.
Any solutions to these problems?
|
|
|
|