Showing posts with label client. Show all posts
Showing posts with label client. Show all posts

Saturday, March 31, 2012

There are too many people accessing the Web site at this time.

What resource have I exhausted if a remote client gets the following message?

"The page cannot be displayed
There are too many people accessing the Web site at this time. "You've exhausted IIS. If you're running Windows XP or Windows 2000 Professional, your IIS process can only handle 10 concurrent connections (at the same time). This is by design and you cannot change this, although with XP you can disable HTTP keep-alives in the properties of the
Web site. When you do this, a limit of 10 concurrent connections still exists, but IIS does not maintain connections for inactive users.

If more than ten connections are needed, you will need to upgrade to one of Microsoft's server platforms.

There has been an I/O Error: Error #2038 - The SaveAs method is configured to require a ro

The application is in NET 20 using vs.2005 and FLEX that was originally in C# which I converted to VB. This whole thing started because a client wanted upload progress indicator for file uploads. It seems to happen after the file is uploaded. How asp.net works is it will cache the file while uploading and then when the full file is uploaded it then seems to copy to the upload Directory. It is at this time that it tosses the error. In firefox it gives a bit more details.

Here is what happens. Select a file to upload, File uploads and on 100% the first error box appears:

There has been an I/O Error: Error #2038: File I/O Error. URL: http://faroutcomputers/Upload.axd?

Then you click okay and the second one shows up:

There has been an HTTP Error: status code 500

Oh and another interesting thing. If I upload with IE7 I get the two errors but the file uploads and is present in the upload directory. If I upload with firefox I get the same two errors but the file does not appear in the upload directory and isn't completed.

> I am running this application on Windows server 2003 enterprise.
> IIS 6

I found this entry in event viewer on windows 2003:

Event code: 3005

Event message: An unhandled exception has occurred.

Event time: 11/13/2007 6:05:01 PM

Event time (UTC): 11/13/2007 11:05:01 PM

Event ID: 8161cd1f609b436382ae30ae036145bc

Event sequence: 128

Event occurrence: 9

Event detail code: 0

Application information:

Application domain: /LM/W3SVC/1148271820/Root/YoyoStudiosUploader2-3-128394676961048560

Trust level: Full

Application Virtual Path: /YoyoStudiosUploader2

Application Path: C:\CommercialWebsites\YoyoStudiosUploader2\

Machine name: WEBSLAVE2

Process information:

Process ID: 668

Process name: aspnet_wp.exe

Account name: WEBSLAVE2\ASPNET

Exception information:

Exception type: HttpException

Exception message: The SaveAs method is configured to require a rooted path, and the path 'Testing.avi' is not rooted.

Request information:

Request URL: http://faroutcomputers.dyndns.biz:8083/YoyoStudiosUploader2/Upload.axd

Request path: /YoyoStudiosUploader2/Upload.axd

User host address: 192.168.1.14

User:

Is authenticated: False

Authentication Type:

Thread account name: WEBSLAVE2\ASPNET

Thread information:

Thread ID: 1

Thread account name: WEBSLAVE2\ASPNET

Is impersonating: False

Stack trace: at System.Web.HttpPostedFile.SaveAs(String filename)

at Upload.ProcessRequest(HttpContext context) in C:\CommercialWebsites\YoyoStudiosUploader2\App_Code\Upload.vb:line 84

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Anyone know why this is happening?

Can you post some of the code where the error is occurring?


Hi,

Based on my understanding, when you use the FileUpload control to upload the file in your asp.net application, you get the error message above. If I have misunderstood you, please feel free to let me know.

Base on the exception message, the problem is that the HttpPostedFile.SaveAs method doesn't accept the file path that you passed.

To better understand your issue, could you please confirm the following information:

Please make sure that the path we pass is correct. We can insert the breakpoint to check.


Okay the application works FINE in IE.

Here is what happens with FIREFOX.
Select a file to upload, File uploads and on 100% the first error box appears:
There has been an I/O Error: Error #2038: File I/O Error. URL: http://faroutcomputers/Upload.axd?
Then you click okay and the second one shows up:
There has been an HTTP Error: status code 500

THIS ERROR IS SHOWN IN THE WINDOWS 2003 Event VIewer.
Exception information:
Exception type: HttpException
Exception message: The SaveAs method is configured to require a rooted path, and the path 'test.mp3' is not rooted.

Anyone know why I get an error in Firefox and IE works like a charm?

Session("FtpFolder") has a value of"C:\CommercialWebsites\mbelcher\"

and this is also shown in the trace info as being the vlaue of the session variable. IE works no issues but Firefox says no.... also Safari on a mac has the same errors as firefox.

CODE BELOW:

Imports Microsoft.VisualBasic

Imports System

Imports System.Data

Imports System.Configuration

Imports System.Web

Imports System.Web.Security

Imports System.Web.UI

Imports System.Web.UI.WebControls

Imports System.Web.UI.WebControls.WebParts

Imports System.Web.UI.HtmlControls

Imports System.IO

Public Class Upload

Implements IHttpHandler

Implements IRequiresSessionState

Public ReadOnly Property isReusable() As Boolean _

Implements IHttpHandler.IsReusable

Get

Return True

End Get

End Property

Public Sub Upload()

End Sub

Public Sub ProcessRequest(ByVal context As HttpContext) _

Implements IHttpHandler.ProcessRequest

If context.Request.Files.Count > 0 Then

' get the applications path

Dim tempFile As String = context.Request.PhysicalApplicationPath

Dim j As Int16

' get the current file

Dim uploadFile As HttpPostedFile = context.Request.Files(0)

' if there was a file uploded

If uploadFile.ContentLength > 0 Then

' save the file to the upload directory

Dim strDirectory As String = HttpContext.Current.Session("FtpFolder")

strDirectory = HttpContext.Current.Session("FtpFolder")

uploadFile.SaveAs(String.Format("{0}{1}", strDirectory, uploadFile.FileName))

' HttpPostedFile has an InputStream also. You can pass this to

' a function, or business logic. You can save it a database:

'byte[] fileData = new byte[uploadFile.ContentLength];

'uploadFile.InputStream.Write(fileData, 0, fileData.Length);

' save byte array into database.

' something I do is extract files from a zip file by passing

' the inputStream to a function that uses SharpZipLib found here:

'http://www.icsharpcode.net/OpenSource/SharpZipLib/

' and then save the files to disk.

End If

'Next

End If

' Used as a fix for a bug in mac flash player that makes the

' onComplete event not fire

HttpContext.Current.Response.Write(" ")

End Sub

End Class



Okay the application works FINE in IE.

Here is what happens with FIREFOX.
Select a file to upload, File uploads and on 100% the first error box appears:
There has been an I/O Error: Error #2038: File I/O Error. URL: http://faroutcomputers/Upload.axd?
Then you click okay and the second one shows up:
There has been an HTTP Error: status code 500

THIS ERROR IS SHOWN IN THE WINDOWS 2003 Event VIewer.
Exception information:
Exception type: HttpException
Exception message: The SaveAs method is configured to require a rooted path, and the path 'test.mp3' is not rooted.

Anyone know why I get an error in Firefox and IE works like a charm?

Session("FtpFolder") has a value of"C:\CommercialWebsites\mbelcher\"

and this is also shown in the trace info as being the vlaue of the session variable. IE works no issues but Firefox says no.... also Safari on a mac has the same errors as firefox.

CODE BELOW:

Imports Microsoft.VisualBasicImports SystemImports System.DataImports System.ConfigurationImports System.WebImports System.Web.SecurityImports System.Web.UIImports System.Web.UI.WebControlsImports System.Web.UI.WebControls.WebPartsImports System.Web.UI.HtmlControlsImports System.IOPublic Class UploadImplements IHttpHandlerImplements IRequiresSessionStatePublic ReadOnly Property isReusable()As Boolean _Implements IHttpHandler.IsReusableGet Return True End Get End Property Public Sub Upload()End Sub Public Sub ProcessRequest(ByVal contextAs HttpContext) _Implements IHttpHandler.ProcessRequestIf context.Request.Files.Count > 0Then' get the applications pathDim tempFileAs String = context.Request.PhysicalApplicationPathDim jAs Int16' get the current fileDim uploadFileAs HttpPostedFile = context.Request.Files(0)' if there was a file uplodedIf uploadFile.ContentLength > 0Then' save the file to the upload directoryDim strDirectoryAs String = HttpContext.Current.Session("FtpFolder") strDirectory = HttpContext.Current.Session("FtpFolder") uploadFile.SaveAs(String.Format("{0}{1}", strDirectory, uploadFile.FileName))' HttpPostedFile has an InputStream also. You can pass this to ' a function, or business logic. You can save it a database: 'byte[] fileData = new byte[uploadFile.ContentLength]; 'uploadFile.InputStream.Write(fileData, 0, fileData.Length); ' save byte array into database. ' something I do is extract files from a zip file by passing ' the inputStream to a function that uses SharpZipLib found here: ' http://www.icsharpcode.net/OpenSource/SharpZipLib/ ' and then save the files to disk.End If'NextEnd If' Used as a fix for a bug in mac flash player that makes the ' onComplete event not fire HttpContext.Current.Response.Write(" ")End SubEnd Class


Hi,

Thanks for your response.

As far as I know, the FileUpload works differently in the IE and FireFox. For example, FileUpload1.PostedFile.FileName returns full path in the IE, but returns file name in the FireFox. So please check the uploadFile.FileName in the IE and FireFox. We can only get the file name with System.IO.Path.GetFileName method, such asSystem.IO.Path.GetFileName( FileUpload1.PostedFile.FileName );


I hope this helps.


So, in other words, your session variable is not set in Firefox. Is this
because you have disabled cookies in Firefox? Or are blocking them for that
site?

I checked and firefox was not blocking cookies but for some reason it wasn't getting the session information. I changed to cookeless and it works fine now in all browsers. There is another issue on a different server that I put the application on. Of course it works fine here on my development server but not on the published one. My server is a development server and is on a machine to itself and I do not work off of it. It hosts many websites all of which work fine viewed form here or out on the net.


Same exact Application, but different servers. Both are windows 2003 servers.

My site:http://faroutcomputers.dyndns.biz:8083/YoyoStudiosUploader2/ The application works fine here on all browsers and images are fine

Site with issues:http://upload.yoyostudios.com – Pictures missing very strange. Haven't seen this issue before.

There is no row at position 0.

I'm using the same page to add new records and update existing records, If there is now record for the client I get the "There is no row at position 0" message. Is there a way to prevent this when the page opens? Below is my code used in the page load event.

 SelectStatement ="SelectClientID,ClassYear,HouseName,CampusName,EducationMajor,GraduationDate FROM tblClients Where [ClientID]=" & _ ClientIDSentDim MyConnectionAs New SqlConnection(ConnectStr)Dim MyAdapterAs SqlDataAdapter =New SqlDataAdapter(MyCommand)Dim ClientDetailsDSAs DataSet =New DataSet MyConnection.ConnectionString = ConnectStr MyAdapter.SelectCommand =New SqlCommand(SelectStatement, MyConnection) MyCommandBuilder =New SqlCommandBuilder(MyAdapter) MyAdapter.Fill(ClientDetailsDS,"tblClients")Try'Fill Alumni Fields. Row = ClientDetailsDS.Tables("tblGivers").Rows(0) ClassYearText.Text = Row.Item("Classyear").ToString() HouseNameText.Text = Row.Item("HouseName").ToString() CampusNameText.Text = Row.Item("CampusName").ToString() EducationMajorText.Text = Row.Item("EducationMajor").ToString() BasicDatePickerGradDate.SelectedValue = Row.Item("GraduationDate").ToString() GraduationDateText.Text = Row.Item("GraduationDate").ToString()Catch exAs ExceptionDim strMessageAs String = ex.Message Response.Write(ex.Message)Finally End Try

Hi Jack

Change your code to check that ClientDetailsDS.Tables("tblGivers").Rows > 0 before then tryong to use the code within'Fill Alumni Fields

Looks like Rows.Count will return 0 and your then trying to set the text fields incorrectly using Row.

Cheers
Gregor


Perfect!

Wednesday, March 28, 2012

Thin client to thick client communication

Hello,
I have an application that consists of both thin client portions and
fat client portions.
One such view consists of a fat client treeview on the left, and a
thin client asp.net webapp on the right.
A user will fill out the webapp's form and click submit. This will
send the data to the DB. I need to know of a way for the treeview
control on the left to be notified when the user clicks submit and get
all the data that the user filled into the form's fields WITHOUT going
back to the DB for this information.
Essentially what I want to do is this...if the asp.net webform were a
fat winforms based section, I could just hook up to a click event on
the button and receive the data through a custom eventargs class. As
far as I know I can't do this in asp.net webapps...so how do I
subscribe to the "event" that tells me the user clicked "Submit" and
send along the data in the forms fields to the treeview?
Thanks very much,
RussWhy use a thick client control?
[url]http://www.componentart.com/demos/treeview/features/core_features/default.aspx[/ur
l]
Fully .Net integrated control that mimics "thick client" application
behavior using DHTML. Cross browser compatible, affordable, easy to use...n
o
excuse to use ActiveX Controls to do tree menus IMO.

Thin client to thick client communication

Hello,

I have an application that consists of both thin client portions and
fat client portions.

One such view consists of a fat client treeview on the left, and a
thin client asp.net webapp on the right.

A user will fill out the webapp's form and click submit. This will
send the data to the DB. I need to know of a way for the treeview
control on the left to be notified when the user clicks submit and get
all the data that the user filled into the form's fields WITHOUT going
back to the DB for this information.
Essentially what I want to do is this...if the asp.net webform were a
fat winforms based section, I could just hook up to a click event on
the button and receive the data through a custom eventargs class. As
far as I know I can't do this in asp.net webapps...so how do I
subscribe to the "event" that tells me the user clicked "Submit" and
send along the data in the forms fields to the treeview?

Thanks very much,
RussWhy use a thick client control?

http://www.componentart.com/demos/t...es/default.aspx

Fully .Net integrated control that mimics "thick client" application
behavior using DHTML. Cross browser compatible, affordable, easy to use...no
excuse to use ActiveX Controls to do tree menus IMO.

thin client using ASP.net

Hello experts,

i read about thin client using Facado (http://www.nexusedge.com/products/products-facado-faq.htm) which is a rich, thin, Java J2EE solution... instead of "click n refresh" HTML, it works like a client-server application. so, the only data that goes back n forth between client n server are relevant data objects...

BUT i also read somewhere (maybe in msdn) under the topic "Application Design Guidelines: From N-Tier to .NET" that says...... "ASP.net Web controls allow building reusable browser GUI elements"...

so i just want to know...
- are these 2 description are similar one thing, that is a rich, thin, client.
- for the 2nd paragraph (.net) is it using the CLICKONCE deployment in visual studio?
- for .net, is there any online example of this type of application (thin client) that i can look for?

thank you very much!I am not an expert but a newbie, too.
However, if not misunderstood by me, you can use Javascript in your pages to do almost all the things that may run on clients.
yes. i'm currently using javascript

but i want to know about thin client like / similar to Facado.. is there any examples that i can try?
Hi,

my guess is that you mean "smart clients" and clickonce is, for as far as I know currently, a new feature in the .NET 2.0 framework that's shipping in 2005.

Smart clients could be winforms that are automatically updated but they can also be winforms controls that are embedded in your asp.net pages.

asp.net web controls provide a lot of things but they don't act like java applets like Facado (I only took a fast glimpse at it).

A link that give you a first impression of what I mean:Host Secure, Lightweight Client-Side Controls in Microsoft Internet Explorer.

Grz, Kris.

Monday, March 26, 2012

This mail server requires authentication when attempting to send to a non-local e-mail add

This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.

the best resource for email with asp.net (IMHO)

http://www.systemnetmail.com/


You will need to authenticate to send an email. Here's how:

http://www.systemnetmail.com/faq/4.2.aspx


Thanks

but when i try to send mail using my username and password it send correctly but when i use my other account like yahoo and hotmail it fail and this exception generates

User not local; please try a different path. The server response was: Sender address is not valid for your login. Check your email program settings.

Thanks in advance

Irfan Ullah


Did you figure this out?