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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

RegEx maximum length doesnt work for me.

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :.NET Framework
 
Hi,

Using this pattern: "((?<=^|\s)\d+-\d+-.+(?=$|\s)(?<=(?:^|\s)[^\s]{5,16}))" I'm trying to define a string that consists of 3 'sections' of this pattern: "d-d-x" where 'd' can be any positive number and 'x' can be anything (word number whitespace). Also I need the string to be a minimum of 5 chars and a maximum of 16 chars (The entire pattern).

It appears to work except that the maximum length is ignored if I have a long 'x' value, for example "1-1-This text is way way too long". This should be false but it is true. If the 16 char length is crossed by the digits it validates false (e.g. "1234567-1234567-Test").

I cant see why it doesnt pick up the 16 char restriction if the 'x' part is too long?




View Complete Post


More Related Resource Links

The maximum string content length quota (8192) has been exceeded while reading XML data.

  
Hi, I have been working on implementing a WCF service and have run into this problem with the maxStringContentLength.  I have read a bunch of posts here on how to correct it and none of them have worked.  I have updated my web.config in my local IIS5 published service to be maxStringContentLength="2147483647" and have updated my application's app.config to be maxStringContentLength="2147483647".  I delete all DLL's, rebuild, restart IIS, make sure all VS 2008 virtual webs are stopped, republish multiple times...even reboot my machine and I continually receive the following error message:The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/qlStatement. The InnerException message was 'There was an error deserializing the object of type System.String. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 171, position 35.'.  Please see InnerException for more details.I am running the service on my local machine: Win XP SP2, IIS5, .Net 3.5, VS 2008Here is my WCF service's servicemodel section of the web.config:    <system.serviceModel>    <bindings>      <wsHt

SharePoint workflow Enable WorkflowModification doesnt work

  
Hi   I'm trying to enable WorkflowModification in a sequential workflow in VS Studio 2008 according to the *** of examples of microsoft but When I run my workflow I get this error: 09/14/2010 10:24:35.78  w3wp.exe (0x11FC)                        0x13A8 Windows SharePoint Services    Workflow Infrastructure        88xr Unexpected WinWF Internal Error, terminating workflow Id# 74f4bd77-7aaa-407e-90ac-f56a6184bc21  09/14/2010 10:24:35.78  w3wp.exe (0x11FC)                        0x13A8 Windows SharePoint Services    Workflow Infrastructure        98d4 Unexpected System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.SharePoint.SPException: Error in the application.     at Microsoft.SharePoint.Workflow.SPWinOEWSSService.EnableWorkflowModification(Guid modificationId, String contextData)     --- End of inner exception stack trace ---     at System.RuntimeMethodHandle._InvokeMe

FAQ: How do I get the maximum path/directory length?

  
How do I get the maximum path/directory length?Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

The Maximum String contenet length quota(8192) has been exceeded while reading xml data

  
Hi,
I am using WCF service and calling in vb6.0 application.
I am using typed contract moniker object to access the services from VB6.0. Everything working fine.
Problem:
Service hosted in windows service using nettcp binidng. Service method return type is XMl string. While I try to access the method I am getting the error message "The Maximum String contenet length quota(8192) has been exceeded while reading xml data". I have modifed readerquota Service appconfig file and svcutil.exe generated client config file.
I put the client config fiel in vb application exe folder.

I have mentioned the Bindingconfiguration name also.


When I changed the cleint config file with junk data vb application giving the  same error. I am not sure whether VB 6.o using client config file.

Please help me.


<binding name="NetTcpBindingEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize

Maximum request length exceeded (Yet Another)

  

I have found numerous links and articles that all suggest modifying either the Web.config or Machine.config file for the maxRequestLength value which is by default 4MB.

However, I have modified the web.config file several times over in the ReportServer directory as well as the ReportManager directory and nothing seems to resolve this issue on my system.

I am running SSRS 2008 on Windows 2008 64-bit Enterprise with 32GB RAM and a dual 3.33GHz processor. Also running 2 separate instances of Report Server on this system so I'm not certain if I should be looking at some other web.config file but I believe both instances should be using the same file. Also should mention that the report has 16 parameters.

1 Article suggested to execute iisreset after altering the file but I am running IIS 7.0 which doesn't use iisreset. So instead, I stopped and restarted the Reporting Server instance using the RS Configuration Manager but it doesn't seem to make a difference.

Hopefully someone here can help me out??? Are there any other aspects of the configuration that I should be looking at to resolve the problem?

PLZ HELP!


Regular Expression - Maximum Length

  

Hi ,

 I need to construct a regular expression for the password textbox, Min:8,Max:16 and must include atleast a number(0-9),alphabets upper and lower case. I am unable to limit the length to 16.Any tips

<asp:RegularExpressionValidator ID="RegEx" runat="server" ControlToValidate="Password"

ErrorMessage="Password must be min:8,max:16 characters and include a number,alphabets upper case and lower case.

"ToolTip="Password format is not correct"

ValidationExpression="^(?=.{8})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$">

</asp:RegularExpressionValidator>

 

 Regards

 Janet


Maximum Request length Exceeded Error - web.config modification does not fix

  

I am running into the Maximum Request length exceeded error on one of my SSRS reports - SQL Server 2005 SP2.  I modified my web.config file as described in this and other threads:

http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/31a74097-28cc-4f29-9397-fdeda1cca994

I restarted all services (IIS, Reporting services) and while it fixes the problem with the parameter, I am getting other errors that are preventing the report from rendering as expected. For example, I have a document map in the report which no longer displays, and expand/collapse capability in the report doesn't work.  Any other ideas for fixing this issue? 


The maximum string content length quota (8192) has been exceeded while reading XML data.

  

 Hi, Im getting the error when I am sending the large message to WCF service, I've seen previous post regarding the same prob and tried all the possibilities but still facing the problem.
Changed the reader quotas values of Client config and service config but no help.

Also tried by adding the below code in client and service  

 

 BasicHttpBinding basicBinding = new BasicHttpBinding();
        basicBinding.MaxBufferSize = Int32.MaxValue;
        basicBinding.MaxReceivedMessageSize = Int32.MaxValue;
        basicBinding.MaxBufferPoolSize = Int32.MaxValue;

        XmlDictionaryReaderQuotas myReaderQuotas = new XmlDictionaryReaderQuotas();
        myReaderQuotas.MaxStringContentLength = Int32.MaxValue;
        myReaderQuotas.MaxArrayLength = Int32.MaxValue;
        myReaderQuotas.MaxBytesPerRead = Int32.MaxValue;
        myReaderQuotas.MaxDepth = Int32.MaxValue;
        myReaderQuotas.MaxNameTableCharCount = Int32.MaxValue;

But still facing the issue.

Here is my

Sendmessage doesnt work in ASP VB IIS6

  

hI ALL

I have an ASP page, that sends data for a local Application on the server...

in my PC which the OS is win XP 32bit ... it works just fine

in the server which is windows server 2008 64bit , with IIS 6

nothing really happens when i send the message in the server, no errors, no data ...   nothing

just like iam pressing a button with no code to handle...!!!!

please , try help me with an answer


Multiselection in Excel filter doesnt work for my calculation

  
Dear all,

I'm having a problem with one of my calculations. It's working perfecty for one selected unit (e.g. year '2010', or quarter 'Q2' for year 2010, or month 'july' for year 2010).
But, in my report in Excel, I MUST have option to select multiple values of date (e.g. quarter 'Q1' and 'Q2', or months 'january' and'february') because some other of my calculation needs multiple values of date. 

What I need is to tell me how to change my calculation when I chose multiple values of date? Is it even posible?
Example:
-if you select five months: 'january', 'february', 'march', 'april', 'may' then I want last month 'may' to be saved in some variable (or if there is some other method, even better) that can be used for making SUM of Amount on period (from begining to latest selected date) described in code below. 



--------
sum(
Ancestor(
[Date].[Year - Quarter - Month - Date].CurrentMember,
[Date].[Year - Quarter - Month - Date].[Year]
        ).FirstSibling.FirstChild.FirstChild.FirstChild:

IIF([Date].[Year - Quarter - Month - Date].CurrentMember.Level.Name="Year" 

Handle: maximum request length exceeded

  

When uploading a file over 4mb I receive error: maximum request length exceeded.

This is fine - I don't want users to upload files any larger.

But, anyone know how to handle the error in a clean way?

It appears I can't avoid it with an IF statement or Try/Catch block.

 

Thanks!


WPF ComboBox Style/Template example from MSDN doesnt work if "IsEnabled"=false?

  

Hello!

I am using a customized look of the WPF combobox control with the help of the msdn Style and Combox Template example taken from here: http://msdn.microsoft.com/en-us/library/ms752094.aspx

I copied that code and I can use the control just fine, but as soon as you set the combobox attribute "IsEnabled" to false, you always get an error warning in Visual Studio 2010 Designer view with the following message:

'System.Windows.Media.Animation.ColorAnimationUsingKeyFrames' animation object cannot be used to animate property 'Foreground' because it is of incompatible type 'System.Windows.Media.Brush'.

Actually I have no idea on how to fix this error. Does anyone have an idea what is causing this error? Since its an msdn example everyone should encounter this error when disabling the control with this template example?

Thanks in advance for your help, kind regards,
Oliver


"The maximum string content length quota (8192) has been exceeded while reading XML data. "

  
I keep getting this when I send a ton of text over the line... and this is SMALL compared to some of the text I want to move.  Any ideas?

The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'UpdateBlogEntry'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 180, position 518.

Write to event log doesnt work

  

Hello, this code works perfect, but when I check the event log I cant see the log, I checked all logs

 

 SPDiagnosticsService diagSvc = SPDiagnosticsService.Local;
        diagSvc.WriteTrace(0, // custom trace id
            new SPDiagnosticsCategory("My category",
                TraceSeverity.Monitorable,
                EventSeverity.Error), // create a category
            TraceSeverity.Monitorable, // set the logging level of this record
            "Writing to the ULS log:  {0}", // custom message
            new object[] { "SharePoint rocks!" } // parameters to message
        );

        diagSvc.WriteEvent(0,// custom trace id
            new SPDiagnosticsCategory("General",
       &nbs

Write to event log doesnt work

  

Hello, this code works perfect, but when I check the event log I cant see the log, I checked all logs

 

 SPDiagnosticsService diagSvc = SPDiagnosticsService.Local;
        diagSvc.WriteTrace(0, // custom trace id
            new SPDiagnosticsCategory("My category",
                TraceSeverity.Monitorable,
                EventSeverity.Error), // create a category
            TraceSeverity.Monitorable, // set the logging level of this record
            "Writing to the ULS log:  {0}", // custom message
            new object[] { "SharePoint rocks!" } // parameters to message
        );

        diagSvc.WriteEvent(0,// custom trace id
            new SPDiagnosticsCategory("General",
       &nbs

The maximum string content length quota (8192) has been exceeded while reading XML data.

  

I'm getting this message when invoke an operation on the service.

I have the readerQuotas configured in the client's config file as follows:

<readerQuotas maxDepth="32" maxStringContentLength="2048000" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />

I

The maximum array length quota (16384) has been exceeded while reading XML data.

  

 

I am getting this error when I try to send a message to my service. I have updated the ReaderQuotas on both the client and the server. Is there something else that I need to do to get the service to accept the message?

 

-paul


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