|
On the Server.
Web site visitor can upload his .DOC file to server. (WINDOWS 2003)
Then my page must print this doc file to default printer that is a PDF Printer.
Winword.exe is lunched. (It appears in Task Manager with associated user: NetworkService)
But it remains! No cpu process!
I changed permission of destination folder to FULL for IIS_WPS & NetworkService & IUSER & ASP.NET users. No Success!
Ali
|
|
|
|
|
Hi there, I'm facing a problem with limiting the file upload size in ASP.NET 2.0, or more specifically, by handling "file too large" errors.
I did the development & testing on a Vista Business / IIS 7, where I was able to handle the situation nicely using the Application_Error handler in global.asax. When the uploaded file size is larger than maxRequestLength, I just displayed a friendly error page with explanation. After deploying the application to the production server, which is running Windows 2003 R2 with IIS 6, I realized that this doesn't work. What's worse, in case the file is larger than the limit, it won't display any error message, IIS simply cuts off the connection and browsers display their own error message about the network connection being interrupted.
Is there any solution to this problem on IIS 6? All my googling points to websites suggesting the Application_Error handler, or eventually configuring a custom error page in IIS directly, but none of this will work if IIS 6 just cuts off the connection. Also, it does this right in the beginning - i.e. I try to upload a 4MB file and it cuts me off after 5 seconds, not after transferring 2MB (which is my current limit, note that the server is remote and I have 256kbit upload) so it must know about the filesize from the start.
I'd like to be able to handle this in a friendlier matter, in a simple way (i.e. handling in .NET code, or by configuring error page in IIS). I know that there are flash uploaders, etc, but those are out of question right now.
Any clues or ideas are highly appreciated!
Thanks,
Rado
|
|
|
|
|
Did you set the values in web.config for upload ?
|
|
|
|
|
But of course - as I said in my original post all works well on IIS 7. The maxRequestLength is set to 2048 (2MB) and executionTimeout to 2 minutes.
Thanks!
|
|
|
|
|
Hi, please try to extend the maxrequestlength in web.config to 5MB or greater, you can extend upto 2 GB for a 2.0 application. Please revert back if the problem still exists.
Thanks,
Rajdev
|
|
|
|
|
Thanks, but actually, I need to limit file upload size (and handle it in a friendly manner) that's why I set this to 2MB so this would not resolve anything. Btw I did not find any solution to this - it seems to me that it's not possible to handle this in IIS6, whereas it works nicely in IIS7.
|
|
|
|
|
Hi,
We have faced a similar issue and resolved it. Please find the instructions we followed to resolve. We have limited the upload size to 10MB and we are showing friendly message if the size exceeds. Please revert back if you still have the issue.Thanks.
Root Cause of the Issue
· IIS6 uses a new metabase property called UploadReadAheadSize when passing data to an ISAPI extension. This property is used to determine the maximum buffer size for the incoming request. The default size for this buffer is 48k
· If UploadReadAheadSize is smaller than the content length, an HTTP 413error is returned, and the connection is closed to prevent deadlock. This causes the “Page cannot be displayed” error in IE
Solution
· Change the value of UploadReadAheadSize to a value larger than the content length
· The following example shows how to set the value for UploadReadAheadSize to 200KB on the Web server
cscript adsutil.vbs set w3svc/1/uploadreadaheadsize 200
Source
http://technet.microsoft.com/en-us/library/cc737382.aspx
http://blogs.msdn.com/jiruss/archive/2007/04/13/http-413-request-entity-too-large-can-t-upload-large-files-using-iis6.aspx
Thanks,
Rajdev
|
|
|
|
|
my database is in ms-access i have column as date when i keep the the datatype as date/time of that column it shows the default time in gridview &details view as 12:00:00
how to remove this time as i am binding data through code
|
|
|
|
|
By writing code that provides a format string. We can't be more specific without knowing what your code looks like.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
avinash86 wrote: how to remove this time as i am binding data through code
For that you need to simply formating you date-time variable while showing on gridview.
As CG suggested , If you put your code over here then we can give the exact solution.
|
|
|
|
|
Hi all,
iam using ByDefault SMTP Server for sending email and iam using system.net.mail namspace(objects) for sending email .
Problem now is that the webapp says "Message Sent" when I send an email TO and FROM a Gmail account, or yahoo account but I never receive the email.
Is there a possibility that Gmail and yahoo doesn't allow email relaying or what else can I try? I am not receiving any error messages in my VB code or anywhere else.
what things iam missing guide me in this issue .
Best regards
Rameez
|
|
|
|
|
Does your SMTP Configure properly ?
Address that you have specified that are really exists ?
rameez Raja wrote: Is there a possibility that Gmail and yahoo doesn't allow email relaying or what else can I try?
No not like that . Did you check on SPAM Folder of that mail id on GMAIL or yahoo ? some times , its send mail to spam folder.
|
|
|
|
|
Thanks for the fast reply .
yes i configure the by default smtp which is the part of IIS correctly .
i checked into spam folder but there is nothing . nor in Inbox .
I have given the address 127.0.0.1
Best regards
Rameez
|
|
|
|
|
rameez Raja wrote: I have given the address 127.0.0.1
Are you talking about which address ? This is the loop Back Address .can you please put the line of code for mail sending section ?
Thanks in advance !!
|
|
|
|
|
Thanks Abhijit for reply ,
Here is the webconfig setting for my Page
<appSettings>
<add key="MyMailServer" value="localhost"/>
<add key="MyMailServerPort" value ="25"/>
</appSettings>
and here is send button click code
Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click
'send message
Dim strMsg As String
strMsg = txtMessage.Text
mTo = Trim(txtTo.Text)
mFrom = Trim(txtFrom.Text)
mSubject = Trim(txtSubject.Text)
mMsg = Trim(txtMessage.Text)
mMailServer = ConfigurationManager.AppSettings.Get("MyMailServer")
mPort = ConfigurationManager.AppSettings.Get("MyMailServerPort")
mCC = Trim(txtCC.Text)
Try
Dim message As New MailMessage(mFrom, mTo, mSubject, mMsg)
If fileAttachments.HasFile Then
Dim attached As New Attachment(Trim(fileAttachments.PostedFile.FileName.ToString()))
message.Attachments.Add(attached)
End If
If mCC <> "" Or mCC <> String.Empty Then
Dim strCC() As String = Split(mCC, ";")
Dim strThisCC As String
For Each strThisCC In strCC
message.CC.Add(Trim(strThisCC))
Next
End If
Dim mySmtpClient As New SmtpClient(mMailServer, mPort)
mySmtpClient.UseDefaultCredentials = True
mySmtpClient.Send(message)
MessageBox("The mail message has been sent to " & message.To.ToString())
Catch ex As FormatException
MessageBox("Format Exception: " & ex.Message)
Catch ex As SmtpException
MessageBox("SMTP Exception: " & ex.Message)
Catch ex As Exception
MessageBox("General Exception: " & ex.Message)
End Try
End Sub
Best Regards
Rameez
|
|
|
|
|
"localhost" is most likely not an email server, you need to use the address of your mail server, such as mail.mycompany.com or 192.236.25.100
Also, if this is a web app, what are you using MessageBox for? Who is going to see the exception?
only two letters away from being an asset
|
|
|
|
|
I didn't get any thing wrong with your code for sending mail. I think there should have some problem with you SMTP Configuration.
|
|
|
|
|
Thanks for the reply,
it mean that i have to configure the smtp which is the part of IIS 6.0
can you guide me in configuration . any link or article point to this issue is highly appericated.
Best regards
Rameez
|
|
|
|
|
|
First of all I would like to say, you should get some knowledge about SMTP before going to implement Email functionality.
For your information... for testing purpose you can use gamil account for sending the mail see the below code-
MailMessage MyMailMessage=new MailMessage();
MyMailMessage.From = new MailAddress("g.parwez@gmail.com");
MyMailMessage.To.Add("g.parwez@gmail.com");
MyMailMessage.Subject = "Parwej Testing !!!";
MyMailMessage.Body = "This is the test text for Parwej Ahamad";
SmtpClient SMTPServer=new SmtpClient("smtp.gmail.com");
SMTPServer.Port = 587;
SMTPServer.Credentials =new System.Net.NetworkCredential("yourgmaid", "yourgmailpassword");
SMTPServer.EnableSsl = true;
SMTPServer.Send(MyMailMessage);
Parwej Ahamad
|
|
|
|
|
I am trying to deploy my ASP.NET 3.5 application to a server on my domain
And I have the following problems
1- I failed to deploy from my machine to the server remotely
I get the error "Could not find a Web server at 'servername'"
(Note that my machine runs WinXP and the server runs Vista with IIS7)
2-To test the server, I copied my work to the server and tried to deploy from there. It SUCCEEDED but still 2 problems:
2.i - the default page does not load, I have to write its path (so, how to define home page in IIS7)
2.ii - I failed to display the web site from any other machine in the domain
I hope to get ideas for all of the above
Thanks
|
|
|
|
|
Mohammed Gouda wrote: 1- I failed to deploy from my machine to the server remotely
I get the error "Could not find a Web server at 'servername'"
(Note that my machine runs WinXP and the server runs Vista with IIS7)
I didn't get your point. You want to deploy remotely ? are you using Copy web tool for that ?
Mohammed Gouda wrote: 2-To test the server, I copied my work to the server and tried to deploy from there. It SUCCEEDED but still 2 problems:
2.i - the default page does not load, I have to write its path (so, how to define home page in IIS7)
2.ii - I failed to display the web site from any other machine in the domain
Yaa.. few month back I have been working in production environment of on of my live project on IIS 7. There are a few changes in settings on IIS 7. I have written a complete article on that. Hope this will helps you
Deploying ASP. Net Websites on IIS 7.0 [^]
Here you get step by step guide . if you have any more doubts can ask me .
|
|
|
|
|
I've developed an application in .NET Framework 2 with c#. I'd like to build a good help file for my application. Since I'm beginer to this, I have no idea if there is a good solution for building a good help file or not.
THANKS,
|
|
|
|
|
There's no automatic way to do it, you need to build a help system yourself. The typical way to do it is to have a url such as help.aspx, and have a help icon that points to pages like help.aspx?id=24, where the id tells the page what help item to load out of the database.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
ravikumar.munde wrote: I'd like to build a good help file for my application
You can use just simple html page, or aspx page or even can use flash for that.
|
|
|
|