.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Sending encrypted Querystring (with + Symbol) problem

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :ASP.Net
 

I Sending a querystring value When it is encryped , I got the encypted value with +symbol

from vb.net code behind......



At that time The querystring contain link does not work properly....



How can i solve this issue..........????







View Complete Post


More Related Resource Links

problem in sms sending

  
I am using asp.net for sending sms through sms gate way and code like is like this public string readHtmlPage(string mobileNumber, string messageText, string sturl)        {            //String result = "";            //String strPost = "username=_sms&password=153&sender=msm-ig&cdmasender=mycdmasenderid&to=" + mobileNumber + "&message=" + messageText + "";            String result = "";            String strPost = "user=5&pwd=2sg&senderid=TM-D&mobileno=" + mobileNumber + "&msgtext=" + messageText + "";            StreamWriter myWriter = null;            HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(sturl);            //add Proxy info if required            //objRequest.Proxy = WebProxy.GetDefaultProxy();            //objRequest.

Symbol.Keyboard.KeyPad() object creation problem

  
on windows mobile 6.5 application running on Windows mobile 6 professional VGA emulator. I am trying to work on keyboard functionality like function key press events. I have coded the below line.   Symbol.Keyboard.KeyPad keypad = new Symbol.Keyboard.KeyPad();   keypad.KeyStateNotify +=new Symbol.Keyboard.KeyPad.KeyboardEventHandler(keypad_KeyStateNotify); keypad.AlphaNotify +=new Symbol.Keyboard.KeyPad.KeyboardEventHandler(keypad_AlphaNotify);   Its build successfully but raising exception at runtime. please help me out to run this code on emulator. because i don't have device.

Sending an e-mail with the content of a GridView in asp.net 2.0. problem

  
Hi experts,  I am Sending an e-mail with the content of a GridView in asp.net 2.0. Everything is working fine , but my problem is that  it is also sending "DELETE" LINKLabel to the email. Is there anyway so that only Content of Gridview will go to email and "Delete" Link will not go. Is it possible ??? Thanks in Advance

Sending Array of Custom Class over WCF Problem

  
I have been attempting to convert some service calls that returned a DataSet into something more lightweight. For instance, I am converting: [OperationContract] public DataSet GetCommittees(); into: [OperationContract] public List<VolunteerCommittee> GetCommittees(); where committee is defined as: [DataContract] public class VolunteerCommittee { [DataMember] public int Id { get; set; } [DataMember] public String Name { get; set; } } I copied the structure of the data contract and the operation contract right from an example in a book I bought on WCF. The author mentioned that the List<VolunteerCommittee> would get converted into an array over the wire, so the client's operation contract looks like: [OperationContract] public VolunteerCommittee[] GetCommittees(); My problem: When the service is called, an empty array is returned every time. When I put trace statements in, I see an array of 48 VolunteerCommittees leaving the server. I've done some reading on the problem and tried a number of suggestions, such as using the XmlSerializer attribute, including a certain namespace as a [return:] on the server's contract, changing the type of binding (it's using wsHttpBinding... I tried basicHttpBinding) and turning off MTOM in the behavior, but none of these changed the empty result of the call. At this point, I'm hoping someone can shine some light on

problem with sending mail by smtpclient

  
 hi , I have an aspx  page that sending a mail by smtp client , but it`s not work properly ! and pass an exeption : failur sending mail here is my code :   protected void BTN_Submit_Order_Click(object sender, EventArgs e) { MailMessage MailMsg = new MailMessage("Sales@anahidcorp.com", "test0@anahidcorp.com"); MailMsg.Subject = "?????"; MailMsg.Body = "????"; MailMsg.IsBodyHtml = false; MailMsg.BodyEncoding = System.Text.Encoding.Unicode; MailMsg.SubjectEncoding = System.Text.Encoding.Unicode; MailMsg.CC.Add("test1@anahidcorp.com"); MailMsg.CC.Add("test2@anahidcorp.com"); NetworkCredential cred = new NetworkCredential("Sales@anahidcorp.com", "mypass"); SmtpClient smtp = new SmtpClient("myserver"); smtp.UseDefaultCredentials = false; smtp.EnableSsl = true; smtp.Credentials = cred; try { smtp.Send(MailMsg); } catch ( SmtpException ex) { Response.Redirect("errpage.aspx?err=" +

Problem sending an email to all users of a sharepoint group

  
Here is what we did so far: 1. created an OU in AD and delegated full control to Sp service account 2. Configured incoming email settings 3. on sp site created a new group with full control permission 4. created an email distribution group for this group with an email address 5. in CA approved the distribution group to be created in OU 6. In Ad we can check the OU is there with the specified email address 7. added users to the group, but when we send an email to the group email address it does not forward to the group members. Please advice  

String encryption problem with request.querystring (urlencode/decode)

  

I need to pass a userid as a guid number through a url quesrystring

 my starting GUID is in string format =  "23c6e6a5-e9fc-4fd0-aa15-e5db9b900388"

1) I encrypt it using tripledes

the resulting string value =  "nJYKpGwOeoOWepKPSDyNnO+xk+ZcfYZnyxvAnKTNCMV/ZJ7CfDKcmA=="

if I immeadiately decrypt it get the expected original value (so my tripledes provider is working)

2) I then urlencode the value for placing into the url which results in:

urlencoded = "nJYKpGwOeoOWepKPSDyNnO%2bxk%2bZcfYZnyxvAnKTNCMV%2fZJ7CfDKcmA%3d%3d"

3) when a read it back from the url using Request.QueryString (a function which automatically decodes the value)

I get the value: "nJYKpGwOeoOWepKPSDyNnO xk ZcfYZnyxvAnKTNCMV/ZJ7CfDKcmA=="

It appears the "+" characters where replaced with " "

This incorrect value caused the tripledes decryption to fail.
I am using VS 2010 Framework 4.0, IIS7, IE8 and the System.Security.Cryptography.TripleDESCryptoServiceProvider

Is this a bug or am I doing something wrong. It appears the the problem is with the urlencode or the embeded urldecode which is part of request.querystring

Many thanks for any assistance in how to resolve this.

ARF.


Problem Sending Alert to External domains from SharePoint 2007

  
The alerts get to the users within company just fine however alerts to partner outside compnay (to external e-mail address) does not work. I have setup relay connector on exchange server 2007 but that did not help. Any help would be greatly appreciated. For testing purpose I have created a contact in MS-Exchange 2007 with an external e-mail address and contatc is viewable at SharePoint site but not getting alert e-mails from SharePoint

sending email problem

  

hi everybody,
i have serious problem in my web site.
i had use some sort of code to send email in my website.the problem is that code works properly in one page and don't work on the other page.
i'm completely confused.
the code behind and web.config :


MailMessage mail = new MailMessage();
mail.From = new MailAddress("contacts@website.com");
mail.To.Add(DropDownList1.SelectedValue);
mail.Subject = txtSubject.Text;
mail.Body = "
something...
";
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient("mailserver.com");
smtp.Credentials = new NetworkCredential("contacts@website.com","password");
smtp.Send(mail);




W E B . C O N F I G



<system.net>
<mailSettings>
<smtp>
<network defaultCredentials="false"/>
</smtp>
</mailSettings>
</system.net>



sending email problem

  

hi everybody,
i have serious problem in my web site.
i had use some sort of code to send email in my website.the problem is that code works properly in one page and don't work on the other page.
i'm completely confused.
the code behind and web.config :



MailMessage mail = new MailMessage();
mail.From = new MailAddress("contacts@website.com");
mail.To.Add(DropDownList1.SelectedValue);
mail.Subject = txtSubject.Text;
mail.Body = "
something...
";
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient("mailserver.com");
smtp.Credentials = new NetworkCredential("contacts@website.com","password");
smtp.Send(mail);






W E B . C O N F I G

<system.net>
<mailSettings>
<smtp>
<network defaultCredentials="false"/>
</smtp>
</mailSettings>
</system.net>

problem with querystring

  

Hi! I have a asp.net c# application that creates some radiobuttons dynamically, and to them I add the attribute onClick, and then a javascript window.location.href with some querystrings. here's the code:


 RadioButton sv = new RadioButton();
                RadioButton en = new RadioButton();
                sv.GroupName = s.ID;
                sv.Text = "SV";
                sv.AutoPostBack = true;
                en.AutoPostBack = true;
                en.Text = "EN";
                en.GroupName = s.ID;
                en.Attributes.Add("onClick", "window.location.href='Inquiry.aspx?inquiryID=" + Dropdownlistinquiries.SelectedValue + "?=1&supplierID="+s.ID.ToString()+"'");
                sv.Attributes.Add("onClick", "window.location.href='Inquiry.aspx?inquiryID=" + Dropdownlistinquiries.SelectedValue + "?=0&supplierID=" + s.ID.ToString() + "'");

the problem is, the only querystring i can find is "inquiryID". when i try to do this in the pageload:

if (Request.QueryString["lang"] == "0" || Request.QueryString["lang"] == "1")
            {
                SqlConnection conn = new SqlConnection(&qu

Problem sending email

  

I have a button with the following code on button click.  I am getting the error given below. Is this how I send email from a click of a button? Tahnks in advance.

Imports System.Web.Mail
Partial Class ASPAddItem
    Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim obj As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient
        Dim Mailmsg As New System.Net.Mail.MailMessage
        Mailmsg.To.Clear()
        Mailmsg.To.Add(New System.Net.Mail.MailAddress("To Name <toname@yahoo.com>"))
        Mailmsg.From = New System.Net.Mail.MailAddress("From Name <fromname@yahoo.com>")
        Mailmsg.Subject = "(My first email from ASP.Net)"
        '  MsgBox("Got mail??")
        Try
            Mailmsg.Body = "(You got mail)"
            obj.Host = "smtp.yourdomain"
            obj.Send(Mailmsg)
        Catch ex As Exception
            Response.Write("Error: " & ex.ToString())
        End Try
    End Sub
End Class


 

 

ERROR

 

 

Error: System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: The remote name could not be resolved: 'smtp.yourdomain' a

a problem by sending records

  

hi

i have a form to get some informations from user

i use linq to data to insert the informations in database

every thing work but when i send informaton after that if i refresh the page with browser it send informations once more and, if i refresh the browser several time it will still send the informations.

can you please help me?  


Problem with Long QueryString

  

hi guys.

i have a query string that is too looong!

and browser cant redirect to destination url.

i fix this problem with append this line to web config

<httpRuntime maxQueryStringLength="26000" maxRequestLength="20480"/>

but just fix in FireFox! and IE has bug!

how i can fix it?


tnx a lot



Mail Sending Problem in VB.net

  


            Dim mail As New MailMessage()           
            mail.From = New MailAddress(FromAddress)
            mail.To.Add(ToAddress)            
            mail.Subject = subject
            mail.BodyEncoding = System.Text.Encoding.ASCII
            mail.Body = TheBody
            mail.IsBodyHtml = isHTML
            mail.Priority = MailPriority.High           
            Dim smt As New SmtpClient("HostName")
            smt.Credentials = New NetworkCredential("mailid", "password")           
            smt.Send(mail)


I use the above Code for sending mail but I got the below error..


A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.47.109:25


How to solve this issue...?


It is very urgent.....



Email sending problem

  

I'm getting this error when I'm send email from my page,

Unable to read data from the transport connection: net_io_connectionclosed


Here my code:

            MailMessage msgMail = new MailMessage();
            msgMail.From = new MailAddress("info@mydomain.com");
            msgMail.To.Add(new MailAddress("emaill@otherdomain.com"));
            msgMail.Subject = "Message from web";
            msgMail.IsBodyHtml = true;
            msgMail.Body = "Test message";
            SmtpClient Client = new SmtpClient();
            Client.Port = 587;
            Client.Host = "smtp server name";
            Client.ServicePoint.MaxIdleTime = 1;
        &n

QueryString problem?

  

Hi,


I m using QueryString and send this as a link in an email. But when the recipient of the email clicks the link, it gives "System.NullReferenceException: Object reference not set to an instance of an object."

Here is the code (link with queryString)

...

Dim URL As String = "http://abc/preview.aspx?formID=" + GeneralFunctions.encryptQueryString(task.FormID.ToString) + "&formType=" + GeneralFunctions.encryptQueryString(task.FormType.ToString) _
                                                   + "&formTableName=" + GeneralFunctions.encryptQueryString(task.FromTableName.ToString) _
                                                   + "&taskID=" + GeneralFunctions.encryptQueryString(task.TasksID.ToString) _
                                                   + "&creator=" + GeneralFunctions.encryptQueryString(task.Creator.ToString) _
                                                   + "&approvalNumber=" + GeneralFunctions.encryptQueryString(task.ApprovalNo.ToString)
....

Here is the preview.aspx.vb
...
If Not Page.IsPostBack Then
            'Decryption
            Dim EformID A
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend