when i execute my local web application the mail is going to gmail,yahoo if am not specifying mail.smptserver.
when i am specifying mail.smtpserver it's not working..ie,mail is not going...
but when i uploaded in net if i am not specifying mail.smtpserver it's showing error and when i give mail.smtpserver the mail is going to the emailid in that server but not going to yahoo mailid and all...
it's urgent for me to solve....
can anyone help me........
I just converted a .net 1.1 web project to .net 2.0 and now I'm getting a strange problem:
I have a custom class implementing IPrincipal to store the user identity in Context.User, sample code below. After storing the Principal i redirect from the login-page. When I retrieve the Context.User on the next page it is of type GenericPrincipal????? The user information is still there but of course not with my custom methods. I guess I could rewrite the code to use GenericPrinfipal instead, but why does this happen??? It did not happen before the conversion (and as far as I can think of I didn't make any other changes to the code).
I use Forms-authentication (using Windows authentication gives me the WindowsPrincipal when retrieving Context.User - i.e. the useridentity of the useraccount running the app, not of the user logged in to the web app).
I feel there has to be a logical explanation for this and I am grateful for any help!
// Create the authentication ticket
FormsAuthenticationTicket authTicket = newUser.GetAuthenticationTicket();
// Now encrypt the ticket.
string encryptedTicket = FormsAuthentication.Encrypt(authTicket);
// Create a cookie and add the encrypted ticket to the
// cookie as data.
HttpCookie authCookie = new HttpCookie(FormsAuthentication.FormsCookieName,
// Add the cookie to the outgoing cookies collection.
// Add user to context
Context.User = newUser;
System.Threading.Thread.CurrentPrincipal = newUser;
i am doing this for uploding the file in the specified directory. But it gives error after the line which i have bolded.
Dim SavePath As String = "C:\temp\"
If IsNothing(filMyFile.PostedFile) = False Then
Dim PostedFile = filMyFile.PostedFile
Dim FileName As String = PostedFile.FileName
Dim ContentType As String = PostedFile.ContentType
Dim ContentLength As Integer = PostedFile.ContentLength PostedFile.SaveAs(SavePath & FileName)
Message.Text = PostedFile.FileName & "Uploaded" & _
" Content Type: " & ContentType & _
" Content Length: " & ContentLength.ToString
Catch ex As Exception
Message.Text = "Failed To upload File" & ex.Source & ex.Message
Error msg : mscorlib Exception has been thrown by the target of an envocation.
can someone please help me out.
Thanks in advance
Commonly, both are used for data interchange between webpages.
From my point Query string is best,for small data interchange.
But using sessions U can interchange even datagrid.So ,based on our requirements we can choose any one of them.
As said. You can use the Query string for small data. But you have to avoid sending confidential data as that would be a hacker's dream. And you have to consider the memory constraints while using the Session object.
how can i display a IE:TabStrip control in two line in a browser,like if i have 20 TABS in a TABSTRIP CONTROL,then i want to display 10 in one line and other 10 TABS in next line just below the first line of tabs