|
Hi,
Currently I'm developing a project with ASP.NET (C# code behind), and I m expecting a bug when I try to upload a file with more than 4Mb.After making some research I find out that 4Mb is the standard file size that can be uploaded.
We can change this limit in the web.config but it s not really what I'm expected.
I'm doing a check on the server side, but this means that the file is already in the cache.
The fact is, even if I check the size limit on the server side , the error is through before.
So how can I display my own error message ?
In advance thanks
|
|
|
|
|
The actual limit is 3mb which is why you are getting the error. There are two web.config settings you need to worry about:
<httpRuntime executionTimeout="300" maxRequestLength="15360"/>
The maxRequestLength in this example has been set to 15mb. The other setting you need to be worried about is the executionTimeout which is this example is set to 300 seconds which is 5 minutes. If these two setting are set correctly you should have no issues upload files to your system.
Hope that helps.
Ben
-- modified at 15:06 Tuesday 2nd October, 2007
|
|
|
|
|
You may want to repost your example. You forgot to check the "Ignore HTML tags in this message" box before you hit the "Post Message" button. Your example isn't visible.
|
|
|
|
|
Thanks Dave,
Usually I am the once asking the people posting a question to do that. It is sort of funny because when I posted my reply I thought to myself, make sure you check that box. Of course, then I forgot to. Anyway, thanks for letting me know.
Ben
|
|
|
|
|
Hi All,
We need small help regarding audio files processing. For
reducing the noise in audio files, is there any API or DLLs available
in .net means in either C# or in VB.
Please help us if anybody knows this problem.
Padma.B
|
|
|
|
|
I don't know of such a lib, but if you feel like to take the dirty way, then you may try with the FFT (fast fourier transform). Well, it is not trivial to use it to process a sound, and I'm not an expert myself, but using FFT (you should be able to find it somewhere) you can transform the sound in a sequence of amplitudes, Each element of the sequence defines the amplitude of the sound at a given frequency. You can sample the noise in a short time of silence (where only noise is recorded) and then use the FFT to get the frequencies that compose the noise. This should let you remove (or better yet reduce) those frequencies from your original sound, thus reducing the noise in it.
Hope this helps
Alessandro
|
|
|
|
|
I look over some projects in CodeProject about creating FolderViev, FolderTreeView etc. in An "Explorer Style" and I see everywhere are used shell operations. Is that the only one way to do controls like this? Isn't there any simple method? Does C# and .Net provide owns classes and methods including shell instructions, or I have to write it always myself? And I have one more questions: Is there any reason that everybody use shell to manage folders instead of using such C# classes like Directory[info], File[info] and others classes included in System.IO namespace?
|
|
|
|
|
Maybe everyone is too lazy to RTFM about the file system / IO classes?
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
I don't know "what" projects you looked over. Some may explain the "why" they are using a specific approach, otherwise they are not very good articles.
|
|
|
|
|
Hi everyone,
I'm trying to compose an XML with serialization in VB.NET, but I'm having a problem with an array. What I'm looking for is to get something like this:
<root>
<item>item 1
<item>item 2
<item>item 3
But if I use a XML array with code like this:
<xml.serialization.xmlarray(elementname:="item")> _
Public Property Item() As List(Of Item)
Get
Return m_items
End Get
Set(ByVal value As List(Of Item))
m_items= value
End Set
End Property
What I get is something like this:
<root>
<item>
<item>item 1
<item>item 2
<item>item 3
How should I do it in order to get the item elements right under the root and not indented inside <item>? This is my first work with serialization and maybe I'm missing something stupid. I've been looking in some forums but I haven't found an answer to this.
Thanks in advance
|
|
|
|
|
If you just have a list of items like:
<item>
...
</item>
<item>
...
</item>
then you would need to deserialize an array like "List<Item>". Here you pass "List<Item>" as the type to the XmlSerializer. I'm not sure of the VB.Net syntax though.
-- updated: had to correct < in my post
-- modified at 9:59 Monday 1st October, 2007
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Sorry, I just realized that my message was also bad because of the html code, I paste it right below.
Tom, thanks for your answer but I don't understand you very well. Do you know the syntax in C#?
Here goes the message again:
Hi everyone,
I'm trying to compose an XML with serialization in VB.NET, but I'm having a problem with an array. What I'm looking for is to get something like this:
<root>
<item>item 1</item>
<item>item 2</item>
<item>item 3</item>
</root>
But if I use a XML array with code like this:
<Xml.Serialization.XmlArray(elementname:="Item")> _
Public Property Item() As List(Of Item)
Get
Return m_items
End Get
Set(ByVal value As List(Of Item))
m_items= value
End Set
End Property
What I get is something like this:
<root>
<Item>
<item>item 1</item>
<item>item 2</item>
<item>item 3</item>
</Item>
</root>
How should I do it in order to get the item elements right under the root and not indented inside <Item>? This is my first work with serialization and maybe I'm missing something stupid. I've been looking in some forums but I haven't found an answer to this.
Thanks in advance
|
|
|
|
|
Check out this post[^], it is the same question you are asking. I'm not sure of the exact VB.Net syntax though, so you will need to translate it from C#.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Sorry, I forgot to escape out the < so you can check the post[^] again.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Tom,
I've been looking at the post you said but I think it doesn't help me (or at least I can't find the solution). Maybe if I detail the problem a little bit further it will help
Inside my root element I have other kind of elements. For example, I would need to create an xml like this:
<house>
<door>brown</door>
<ceiling>orange</ceiling>
<window>blue</window>
<window>black</window>
<window>red</window>
</house>
What do I have to do to get those 3 <window> elements just under the <house> element and not getting something like this:
<house>
<door>brown</door>
<ceiling>orange</ceiling>
<windows>
<window>blue</window>
<window>black</window>
<window>red</window>
</windows>
</house>
I hope I'm explaining well It doesn't matter if you give me C# code, I will translate it.
Thank you very much
|
|
|
|
|
You explained it very well, but I don't think you can use the XmlSerializer like that. You may need to go with an alternate solution[^].
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Tom,
I finally made it, but with the help of your first answer I changed the line
<Xml.Serialization.XmlArray(elementname:="Item")>
with
<Xml.Serialization.XmlElement(elementname:="Item")>
Thank you very much for your help. Regards
|
|
|
|
|
While using MsmqIntegrationBinding to read transactional queues on multiple threads, when a poison message occurs (MsmqPoisonMessageException) it will set the service instance to a faulted state. When this happens, any parallel threads' transactions are rolled back (therefore the messages go back on the queue, even though they have already started processing). Assume that the process started by each of these messages is not transactional (therefore not enlisted in the transaction and not rolled back). The obvious choice is to move the poison message to another queue and restart the service instance. When this happens it will pick up the messages that have already started processing before and will cause redundant processing. Can you see any way to avoid this?
|
|
|
|
|
Hi,
We are planning to rewrite out data access layers in framework 3.0 (currently its is Framework 1.1). We are using DataSets throughout for data access, and also while passing data from Data Layer to other layers.
I have to find out alternative data containers, because DataSet would consume lots of memory because mostly we may have to fetch a few rows and for that we don't want to use a DataSet. DataTable could be an alternative, but I wanted to know if there are other data efficient data containers in new .NET Framework, or another method of data access.
I am doing my research on google, still it would be great if someone could point me in the right direction.
Regards,
Blumen
|
|
|
|
|
Please don't cross post. It doesn't help anybody your doing this.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I am New to .net technology...How to Upgrade From Visual Studio 2003 to Visual Studio 2005? Also How to Convert the Projects which were developed in VS 2003 to VS 2005?? Reply Me...
|
|
|
|
|
spalanivel wrote: I am New to .net technology...How to Upgrade From Visual Studio 2003 to Visual Studio 2005?
Install Visual Studio 2005 - The two can sit happily side by side
spalanivel wrote: Also How to Convert the Projects which were developed in VS 2003 to VS 2005??
Open the solution in Visual Studio 2005. It will ask if you want to convert it.
spalanivel wrote: Reply Me...
Who else were you thinking I might reply to?
|
|
|
|
|
Thanks Colin...Plz tell what are the steps need to follow while upgrading?
|
|
|
|
|
spalanivel wrote: Plz tell what are the steps need to follow while upgrading?
Sit back, and have a nice cup of tea...
If you are worried about your code: Back it up first. Then upgrade. There isn't much more to it. You press a few buttons on the installer. Sit back and wait for it to install.
|
|
|
|
|
Colin Angus Mackay wrote: Sit back, and have a nice cup of tea...
Cardinal Fang. Bring out the comfy cushion.
Deja View - the feeling that you've seen this post before.
|
|
|
|