|
come on man.
Go to means "Select"
When you open "dcomcnfg"
On the Left hand side panel under the "Console Root" Select those options in the tree view (click +)
And after you select the last node find the excel application on the right hand side panel.
|
|
|
|
|
Hi,
I am trying to send email through C# using my Gmail account.When i am running this application from direct internect connection system its working fine. when i am using a proxy system its showing 'Failure sending mail'.
i am using the code
SmtpClient SmtpServer = new SmtpClient();
SmtpServer.Credentials = new System.Net.NetworkCredential ("username","password");
SmtpServer.Port = 587;
SmtpServer.Host = "smtp.gmail.com";
SmtpServer.EnableSsl = true;
mail = new MailMessage();
mail.From = "";
mail.Subject = "";
SmtpServer.Send(mail);
Thanks in advance
AnupMadathil
|
|
|
|
|
I don't believe that the .NET email classes have ways to set a proxy server.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
I want to access the data of a PDF file which is opened on IE using BHO.
Using a Browser Helper Object, how can I come to know that a PDF file is opened on IE.
The BHO in the following link is helpful for retrieving data of web pages.
http://www.codeproject.com/KB/cs/Attach_BHO_with_C_.aspx?fid=447248&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=51&select=2421069
But how the PDF file data can be retrieved?
|
|
|
|
|
Hi everyone, i need your help
This is my sym.cs file where it store the encryption part
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Security.Cryptography;
namespace SecurePDFViewer
{
public class SymCrypto
{
private SymmetricAlgorithm symAlgorithm;
private static byte[] saltValue = new byte[] {213,230,110,217,191,69,82,238};
private static byte[] IV = new byte[] { 207, 177, 154, 229, 191, 104, 44, 244, 86, 12, 63, 54, 94, 9, 88, 148 };
private static int keySize = 256;
private static int pwIteration = 7;
public SymCrypto()
{
//Creates the default implementation, which is RijndaelManaged 256 bits
symAlgorithm = SymmetricAlgorithm.Create();
symAlgorithm.IV = IV;
}
public SymCrypto(string algorithmName)
{
symAlgorithm = SymmetricAlgorithm.Create(algorithmName);
symAlgorithm.KeySize = keySize;
symAlgorithm.IV = IV;
}
public byte[] EncryptData(string passphrase, byte[] plainBytes)
{
GenerateKey(passphrase);
// Define memory stream which will be used to hold encrypted data
MemoryStream memoryStream = new MemoryStream();
// Define cryptographic stream (Write mode for encryption)
CryptoStream cryptoStream = new CryptoStream(memoryStream,
symAlgorithm.CreateEncryptor(),
CryptoStreamMode.Write);
cryptoStream.Write(plainBytes, 0, plainBytes.Length);
cryptoStream.FlushFinalBlock();
byte[] cipherBytes = memoryStream.ToArray();
// Close streams
memoryStream.Close();
cryptoStream.Close();
return cipherBytes;
}
public string EncryptData(string passphrase, string plainText)
{
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
return Convert.ToBase64String(EncryptData(passphrase, plainTextBytes));
}
public byte[] DecryptData(string passphrase, byte[] cipherBytes)
{
GenerateKey(passphrase);
// Define memory stream which will be used to hold encrypted data
MemoryStream memoryStream = new MemoryStream(cipherBytes);
// Define cryptographic stream (Read mode for decryption)
CryptoStream cryptoStream = new CryptoStream(memoryStream,
symAlgorithm.CreateDecryptor(),
CryptoStreamMode.Read);
byte[] plainBytes = new byte[cipherBytes.Length];
int count = cryptoStream.Read(plainBytes, 0, plainBytes.Length);
// Close streams
memoryStream.Close();
cryptoStream.Close();
byte[] actualBytes = new byte[count];
for (int i = 0; i < count; i++)
{
actualBytes[i] = plainBytes[i];
}
return actualBytes;
}
public string DecryptData(string passphrase, string cipherText)
{
byte[] cipherTextBytes = Convert.FromBase64String(cipherText);
return Encoding.UTF8.GetString(DecryptData(passphrase, cipherTextBytes), 0, 1000);
}
private void GenerateKey(string passphrase)
{
Rfc2898DeriveBytes pwdGen = new Rfc2898DeriveBytes(passphrase, saltValue, pwIteration);
symAlgorithm.Key = pwdGen.GetBytes(keySize/8);
}
}
}
------------------------------------------------------------------------------------------------------
Main.cs
using System.IO;
using System.Security.Cryptography;
private void button1_Click(object sender, EventArgs e)
{
SymCrypto sym = new SymCrypto();
string cipherText = sym.EncryptData("I love Java", "2.1 SCOPE OF TESTS\nThe test plan for User Authentication System webservice will consist \nof the following tests related to interoperability: a) WS-I Basic Profile 1.1 Interoperability Tests Interoperability testing will be performed in conformance to WS-I Basic Profile 1.1 specifications. The profile addresses the following areas: \n• Messaging Messaging includes XML Representation of SOAP Messages, SOAP Processing Model and use of SOAP in HTTP. Four specifications are referenced in this section:• Simple Object Access Protocol (SOAP) 1.1• Extensible Markup Language (XML) 1.0 (Second Edition)• RFC26116 Hypertext Transport Protocol HTTP/ 1.1 • RFC2965: HTTP State Management Mechanism• Service DescriptionThis refers to Web Services Description Language (WSDL) to enable the description of services as sets of endpoints operating on messages. Three specifications and extensibility points are referenced in this section:• Web Services Description Language 1.1• XML Schema Part 1: Structures•"); <---- HARD CODE
string abc = ("how are you"); <-- HARD CODE
MessageBox.Show(cipherText + abc);
string plainText = sym.DecryptData("I love Java", cipherText);
MessageBox.Show(plainText + abc);
}
------------------------------------------------------------------------------------------------------
I will be using a IE toolbar button to mark it...
But how can change it so that i can read the encrypted html?
Thank you
|
|
|
|
|
We didn't need to see all this code. So, you're saying you can decrypt it, but you want to display it in IE via a toolbar ? So, you want to intercept an HTTP request and decode it, right ?
Does it have to be in a toolbar, could it be in an app that contains an IE control and then does the HTTP request ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
No,
Cause this encrypt is hardcode
How can i do like this: Use getElementsByName()
if my
var x=document.getElementsByName("encrypt");
How can i capture those encrypt in the html and ancrypt it?
text"
text
|
|
|
|
|
No,
Cause that encrypt words is hardcoded
How can i do like this: Use getElementsByName()
if my
var x=document.getElementsByName("encrypt");
How can i capture those encrypt in the html and ancrypt it?
text"
text
|
|
|
|
|
|
Kanchan Pawar wrote: urgent...........
No its not.
You obviously do NOT know what you are talking about, the microsoft .net framework is not something you can import anything into, its a code for running applications.
I suugest you get some books about .net and read them before going any further.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
I suggest you need a new keyboard first. Your period (".") key is malfunctioning.
|
|
|
|
|
Kanchan Pawar wrote: urgent...........
I assume you were expecting Intellisense to tell you what appeared after the first period. Continuing to press the key after the first one failed to do what you want is just an exercise in futility.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys
|
|
|
|
|
?You are a moron. A grade A moron. And around here, that's saying something.
Buy a book and read it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
it is very urgent.................
|
|
|
|
|
Kanchan Pawar wrote: it is very urgent.................
No, its not, otherwise you would go out and buy some. If you want code written for you try rentacoder.com - I also suggest you learn to specify what you mean better.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Turn off the computer and walk away. You are just too stupid to use one. Sorry.
"can u please send me that autodiagramer software"
What auto diagrammer software ? This is not a place for pirates, it's a place for people who write code. You mean you want the source code for a project you need to write ? You must be joking
"it is very urgent................."
No, it's not. We help people out of the goodness of our hearts, but we don't actually give a damn if you meet your deadline or not. It's not urgent to us, at all.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Dear All,
I am using ListView control for display the record in listview from database i need to display id, name, etc very thing from database.
Please tell guide me.
Thanks.
|
|
|
|
|
I recommend you learn to use google, and buy/read a book on how to use C#. It's obvious to me that you're yet another outsourced worker, who has taken a job they know absolutely nothing about ,and are hoping we'll do your work for you. We try to help people who show some sign of making an effort.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello friends I want to fill a combo with only year value like when we fill our birth year in many sites. How can I do this.. ??
Any help would be appreciated..
Johnny
|
|
|
|
|
Which bit is confusing you ? Do you know how to add values to a combo box ? You can use DateTime.Now to get the current year and work from there, if you need to.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
No I want to fill the combo with only year value like below.
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
.
.
.
.
|
|
|
|
|
OK, and what is the issue ? As someone else said more explicitly than I did, you can use DateTime.Now to get years from this year going back, or going forward. The obvious thing to do is to create a list of ints, and use a loop to create them, then make that your data source.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Just fetch the running year using DataTime.Now.Year
If you want to display 10 years before and after the current year. Subtract the value by 10 and make a for loop of 20 times filling the year value.That's it.
E.G.
ComboBox cb = new ComboBox();
int year = DateTime.Now.Year;
year = year - 10;
cb.Items.Clear();
for(int i =0;i<20;i++)
{
cb.Items.Add(year + i);
}
|
|
|
|
|
Hi,
I uploaded my excel file into a folder(server), now i want to read that file from the folder, than i have to insert that excel into a database with same filds,
I have done this but from local system i can able to read a file not from the uploaded folder.
So how to read a excel file from folder....
Below code is the one i have used from local system, the connections string
String sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='c:/valuefirst.xls';Extended Properties=Excel 8.0"; (its working)
How to take this excel sheet from server folder.
Pls help me,
thanx
krishna
|
|
|
|
|
Don't crosspost, it's rude.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|