Hi All, I am working on a BizTalk project. I have made a POP3 adapter for a SSL enabled mail server. I am getting this error : The adapter "POP3" raised an error message. Details "The POP3 adapter could not establish a secure session with the server. This could be due to the following reasons: 1) The server listening on the supplied POP3 port does not support SSL. 2) The POP3 server name does not match the machine name in the SSL certificate. 3) The SSL certificate of POP3 server is either expired or not valid. URL: POP3://juht.jugy.locy\inata-dev Error: The remote certificate is invalid according to the validation procedure. ". Any pointers will be highly appreciated.
Suman Singh
Posts
-
The POP3 adapter could not establish a secure session with the server -
Splitting POP3 Email Attachments in BizTalk 2006Hi All, I am working on a BizTalk project. I need to make a orchestration or POP3 Adapter, which will read all mail messages, extract all attachments and put all attachment files in a particular folder or MSMQueue. I did googlig and came up with these outcomes : 1) Splitting POP3 Email Attachments in BizTalk 2006 http://geekswithblogs.net/sthomas/archive/2006/08/08/87439.aspx http://www.biztalkgurus.com/Samples/Split-Pop3-Attachments-BizTalk-2006.html 2) Creating a BizTalk Application That Uses the POP3 Adapter http://msdn2.microsoft.com/en-US/library/aa578201.aspx But these articles don't provide a clear way to go. Please share any sample code snippet, algorithm or pointer in this regard. Thanks in advance. Regards,
-
Read excel with diff datatypes in one columnHi All, I have an excel file in this format, which I am trying to read using c# 04/05/2006 46 47 25 26 27 15 vgc 57 I am not able to read the values of row[1][0] and row[2][0], because in this column, the datatype of value in first row is date (04/05/2006). In the same way, I am not able to read the row[2][1], because in this column, the datatype of value in first row is a numeric. So, according to my perception, you need to have same datatype values in any particular column to read it in C#. I am looking for any option to read these type of excel files with values of different datatypes in a particular column. Any input will be highly appreciated. FYI, This is the code snippet, I am using to read this excel file. // Create connection string variable. Modify the "Data Source" parameter as appropriate for your environment. String filePath = "D:\\ProjectInfo\\HU Mail\\test.xls"; String sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + filePath + "; Extended Properties=\"Excel 8.0;HDR=NO;\""; // Create connection object by using the preceding connection string. OleDbConnection objConn = new OleDbConnection(sConnectionString); // Open connection with the database. objConn.Open(); DataTable dt = null; // Get the data table containg the schema guid. dt = objConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); String[] strSheetName = new String[dt.Rows.Count]; int i = 0; // Add the sheet name to the string array. foreach (DataRow row in dt.Rows) { strSheetName[i] = row["TABLE_NAME"].ToString(); i++; } string strComand = "select * from [" + strSheetName[2] + "]"; OleDbCommand objCmdSelect = new OleDbCommand(strComand, objConn); // Create new OleDbDataAdapter that is used to build a DataSet based on the preceding SQL SELECT statement. OleDbDataAdapter objAdapter1 = new OleDbDataAdapter(); // Pass the Select command to the adapter. objAdapter1.SelectCommand = objCmdSelect; // Create new DataSet to hold information from the worksheet. DataSet dsDeal = new DataSet(); // Fill the DataSet with the information from the worksheet. objAdapter1.Fill(dsDeal, "LMPPrices"); for (int k = 0; k < dsDeal.Tables[0].Rows.Count; k++) { for (int j = 0; j < dsDeal.Tables[0].Columns.Count; j++) { Console.Write(dsDeal.Tables[0].Rows[k][j].ToString() + " -> "); } Console.WriteLine(); } Console.ReadLine(); Best Regards,
-
how can i put my icon in addressbar [modified]Two steps : Step 1 : Create a icon image named "favicon.ico" and keep it on root Step 2 : Add these lines into the header of your HTML file... Suman Singh
-
LIMIT in MSAccess SQL QueryHi All, How can I get records for a limit in MS Access. Let say, there are 2500 records are in table. I want to fetch records from 1800 to 1900... TOP clause coould not solve this problem.... Thanks in advance... Suman Singh
-
How to retrieve HTTP_RAW_POST_DATA in c# 2.0Thanks for your reply... I was using this code : msg = Request.ServerVariables["HTTP_RAW_POST_DATA"]; but got nothing.. then I used : msg = Request.ServerVariables; and all the servervariables came into file but there was no any xml notification data... I got : APPL_MD_PATH=%2fLM%2fW3SVC%2f1%2fRoot%2fwcp APPL_PHYSICAL_PATH=C%3a%5cInetpub%5cwwwroot%5cwebcreatorplus%5c AUTH_TYPE= AUTH_USER= AUTH_PASSWORD= LOGON_USER= REMOTE_USER= CERT_COOKIE= CERT_FLAGS= CERT_ISSUER= CERT_KEYSIZE= CERT_SECRETKEYSIZE= CERT_SERIALNUMBER= CERT_SERVER_ISSUER= CERT_SERVER_SUBJECT= CERT_SUBJECT= CONTENT_LENGTH=2374 CONTENT_TYPE=application%2fxml GATEWAY_INTERFACE=CGI%2f1.1 these type of many variables but there was no any variable with XML notification data.. Please help. I will be highly obliged due to your this act of kindness.. I am not so much experienced in .net so I seek help from experienced people like you... Regards, Suman Singh
-
How to retrieve HTTP_RAW_POST_DATA in c# 2.0Hello, I am trying to integrate GoogleCheckout and working on to process order notifications sent by google... Google sends order notifictaion in XML format as HTTP_RAW_POST_DATA. I can retrive it in PHP as follows: if(isset($GLOBALS["HTTP_RAW_POST_DATA"]) && $GLOBALS["HTTP_RAW_POST_DATA"] != "") { $msg.="
".$GLOBALS["HTTP_RAW_POST_DATA"]; } Can anybody let me know its equivalent code in asp.net C# 2.0 Thanks in advance for all your help. Regards, Suman Singh -
How to retrieve HTTP_RAW_POST_DATA in c# 2.0Hello, I am trying to integrate GoogleCheckout and working on to process order notifications sent by google... Google sends order notifictaion in XML format as HTTP_RAW_POST_DATA. I can retrive it in PHP as follows: if(isset($GLOBALS["HTTP_RAW_POST_DATA"]) && $GLOBALS["HTTP_RAW_POST_DATA"] != "") { $msg.="
".$GLOBALS["HTTP_RAW_POST_DATA"]; } Can anybody let me know its equivalent code in asp.net C# 2.0 Thanks in advance for all your help. Regards, Suman Singh -
How to find text in more than one line using RegexMany Thanks for your reply. I tried your suggestion but no avail... Here is the HTML code from a file (categories.html), I a reading in a variable st :
{=BeginCatRecords=}{=EndCatRecords=}{=CatDesc=}
In this file, from {=BeginCatRecords=} to {=EndCatRecords=} is written in one line.. and it is working fine... But if I split it in multiline like : {=BeginCatRecords=}
{=CatDesc=}
{=EndCatRecords=} It stops working... Below is the code I am using to match the string : string NavMatch = null; pattern = @"{=BeginCatRecords=}.*?{=EndCatRecords=}"; Match MatchTop = Regex.Match(st, pattern, RegexOptions.Multiline); NavMatch = MatchTop.ToString(); Please help.. Suman Singh
-
How to find text in more than one line using RegexHi all, I am developing a CMS using asp.net 2.0 and c# 2.0. I have a html template file... with the following text in the file. {=BeginCatRecords=}
Links comes here
{=EndCatRecords=} I am reading this file in a variable let say st. Now, I want to find the text from {=BeginCatRecords=} to {=EndCatRecords=} I am using this code : string pattern = @"{=BeginCatRecords=}.*?{=EndCatRecords=}"; Match MatchTop = Regex.Match(st, pattern); string NavMatch = MatchTop.ToString(); It is working fine when I write the html in one line (as displayed above) in my html template file.. But when I change it to multiple line as : {=BeginCatRecords=}
Links comes here
{=EndCatRecords=} It doesn't work. Can you please let me know how should I change the pattern to meet the requirement.... Thank you in advance.. Suman Singh
-
copy and paste urla very simple solution may be 1. create a session let say, user 2. when you are checking the username and password from database and if you find the record, Assign value of userid to the session 3. On each restricted page or on the master page place this code: if(Session["user"].ToString() == "") { Response.Redirect("default.aspx"); } 4. On logout assign blank to this session and remove it... Hopefully it will solve your problem. Suman Singh
-
how to create a login application using ASP.NETAccording to my perception 1.Link a microsoft access database to asp.net you need a connection string to connect to database .. string constring= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\projects\data\thetre.mdb;User Id=admin;Password=;"; OleDbConnection mycon= new OleDbConnection(constring); 2.Write some line of code to make it run and open another page on a button click. Please clarify "to make it run".... Do you want to fetch records by a sql ? if yes try this function: You need to use 2 namespaces : using System.Data; using System.Data.OleDb; public DataTable fetch_data(string sql) { string constring= ConfigurationSettings.AppSettings["con"]; OleDbConnection mycon= new OleDbConnection(constring); OleDbDataAdapter dap= new OleDbDataAdapter (sql, mycon); DataSet stds= new DataSet(); dap.Fill(stds); DataTable dt=stds.Tables[0]; mycon.Close(); return dt; } On button_click event write this code : Response.Redirect("Page2.aspx"); Suman Singh
-
show confirm box in asp.net+c# with click on linkOn the link you can call a javascript function like : [Delete](javascript:Validate_content();) and define this javascript function to see Yes/No confirmation box..... <!-- function Validate_content() { var answer = confirm("Are you sure you want to Delete ?"); if(answer) { document.contentform.submit(); } else { return; } } //--> Please remember, you need to manage c# code for a particular Id or whatever... Suman Singh
-
How to delete uploaded file. -
How to select multiple items in a multiple dropdownlistHi, I am using a multiple dropdownlist and want to select more than one items coming from database.. Let say, the multiple dropdown has following items : 1 2 3 4 5 and from database an array with values 2 and 5 is coming. string[] val = {2, 5}; I want to select 2 and 5 in the dropdownlist. Please help. Suman Singh
-
How to delete uploaded file.string delpath = "C:\Inetpub\wwwroot\projects\images\image1.gif"//complete physicalpath of your image if (File.Exists(delpath)) { File.Delete(delpath); } This will delete the file physically from the server... Suman Singh
-
Regular expression to match a string in C#Hi all, I want to match a string let say {begin}
{=LinkName=} {end} from {begin} to {end} and put it in a variable so that I can replace the value of {=NavLink=} and {=LinkName=} coming from the database... Can you please help me to find the exact regular expression syntax.. Thanks in advance for your help... Suman Singh
-
conditional inclusion of a namespaceHello minhpc_bk, Thanks for your answer. Actually, I wanted to make it admin driven.. or it may be that there will be a dropdown in user section to choose a language and user can change the language anytime... ex : http://www.shareit.com/101343-1.html[^] Can you please help. Suman Singh
-
conditional inclusion of a namespaceHi all, I m working on a multilanguage project in ASP.net C# v2.0. I created a namespace "language.eng" and defined some text string within it. Now, I want to include it after checking the configuration is set to language english. Let say, if(Session["lang"].tostring() == "english") then I want to include this namespace so that I can use the strings value... Same, if(Session["lang"].tostring() == "spanish") then I want to include "language.spenish" namespace. How can I do this. Please help. Thanks in Advance. Suman Singh
-
How to execute a PHP file from C# codeHi All, I am a new programmer in .net and need some help from you.. I m using .net framework 1.1 and it has capability of sending only unauthenticated emails by using SmtpMail class.. The server on which my site is running uses authenticated email and I am unable to send email throgh C# script, because I can't enter username and password of the sender email... So, is there any option to call a php file lying on any other server, to which we pass some variables and it will send the email... or Do you have any other ideas.. I hope you people certainly help me to find out the solution.. Thanks in advance. Suman Singh