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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

need to add check on property in wsdl (schema).

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


I have created n-tier application (of type Webservice).

Now i want to include the checks on my all classes's properties in WSDL file.

For example: employee is one of that classes and employee name is one of the required property on which we have made a check that if it contains more than 40 charachters then it should raise a custom exception. 


if (value.Length > 30)
          event_logger.Error("Street Name of Address must be less than 20 characters long.");         
          throw new CrackerJackException(new CrackerJackException().GetCompleteException(ErrorCode.InvalidDataField)); 

Please help and suggest.


View Complete Post

More Related Resource Links

core results web part - Property doesn't exist or is used in a manner inconsistent with schema sett

I edited the Fetched Properties section of my core results web part and added a mapped column <Column Name="owstaxIdKeyword"/> When I reload my page, I get this error: Property doesn't exist or is used in a manner inconsistent with schema settings.

schema check

I'm putting together a genealogy site for my extended family using MySQL and PHP, and am beginning with establishing a db schema. Was hoping some folks would be willing to take a look and advise me, as I'm not a database pro though have been getting comfortable with MySQL lately. But the relational aspect of schemas is still a little bit of a mystery to me. I posted a visual representation of the schema here: http://edgeis.com/graphics/projects/database-schema.png Thanks

WCF WSDL generated paths for xsd:schema, wsdl:import, soap:address wrong for WCF behind a firewall.


My WCF server is behind a firewall
but the schema locations are incorrect in the wsdl

   <xsd:schema targetNamespace="http://www.myserver.net/Imports">
      <xsd:import schemaLocation="" namespace="http://www.myserver.net" />
      <xsd:import schemaLocation="" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
      <xsd:import schemaLocation="

How to check CheckBox.IsChecked property if CheckBox is in header of ListView/GridView with grouping


Sorry for this difficult title :P

So what exactly I need? I will try to explain it step by step as easy as possible.
My question is on the end of this post, but to understand my issue is better to read all steps.

First have a look on this post http://msdn.microsoft.com/en-us/library/ms754027(v=VS.90).aspx

1) I am implementing allmost the same code. 
But I changed one TextBlock (in Expander.Header) for a CheckBox:

<ListView x:Name="ExampleListView"
 ItemsSource="{Binding Source={StaticResource Src}}"

 <GridViewColumn DisplayMemberBinding="{Binding Path=PropertyOne}" Header="One" />
 <GridViewColumn DisplayMemberBinding="{Binding Path=PropertyTwo}" Header="Two" />


How to check for Maximum property of a ProgressBar in a trigger statement


I have a style defined for my custom ProgressBar control. I have a dependency property (Type: double) ("testDoubleVariable") for which I want to perform some action when my testVariable value equals to Maximum value of my control ( as I might be providing some dynamic value for Maximum property). my sample code snippet is:

            <Trigger Property="testDoubleVariable" Value="Maximum">
              <Setter Property="Visibility" TargetName

Check the if SSAS Roles property is used in excel connection string before returning the values



We are using Excel 2007 to connect to SSAS cubes. We have many roles for a user and all having different permission including different VISUAL TOTAL setting. We want to restrict the user so that he cannot see anything if he is not using the ROLES property in the excel connection string.

At the run time I want to know if the user who is using excel has used ROLES property or not.

Any help will be appreciated

Mr myName

Using a CompareValidator to check input is a valid date

The CompareValidator can do more than just compare two controls. You can also compare it against several of the main .net data types such as Date, Integer, Double and Currency.

To do this you would set Operator="DataTypeCheck" and instead of setting the ControlToCompare or ValueToCompare attributes as you normally would you use the Type="Date" (or any of the data types I have listed above).

Check All with JQuery and a Asp.Net GridView

Display a Grid on the screen with a checkbox in each row. At the bottom of the page have "Check All" button.

Typically if I need to do anything interesting I use a template column. So my GridView will look like the one below (most other columns removed for readability). The only interesting point to note is the CssClass="ApprovalCheckBox" in the CheckBox ItemTemplate.

WPF / Silverlight tutorial: Visibility property and binding

Visibility property is a very powerful and yet often overlooked property available in both WPF and Silverlight. It enables you to set Visibility of certain UIElement objects to different states like: Visible, Collapsed and Hidden (not supported by Silverlight). This tutorial shows you how to use it and how to bind to Visibility property

abstract away the source of the connection string using a class with a static property.

ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Let's abstract away the source of the connection string using a class with a static property.

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

check box control


Hi ,

I have a three check box in my web form ,i need to choose only one check box, if i choose one check box

another 2 check box automatically unchecked

can i use jquery for check box

I thought this would be simple... Trying to create a login does an ajax check before submit


I have the standard .net login control that is working.  (Still learning .net after 15yrs of classic)

What I want to do is OnButtonClick run a javascript function (to do an ajax call to the db to check if login is valid or not) and if it returns true, then submit the form normally, else don't submit. The piece that I can't figure out, is how to correctly override the default click even to hit my JS routine and then submit the form properly afterwards.

Thanks ahead of time

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

how to check a textbox value in jquery?



I want to perform some action when an asp.net textbox value length is greater than 1 character. And for this I wanted to know how to write this check in jquery?

I have created a check like below-

if ($('[id=txtUserInput]').val().length > 2)
{ do some work...} 

But its giving me the following error

$("[id=txtUserInput]").val() is undefined

Can anybody let me know the right way of doing this?



How to check for null/empty strings on dynamic objects?


What is the proper way to check for null or empty strings on dynamic objects? This is the only solution I've found so far:

if (admin.PasswordHash.GetType() == typeof(DBNull) || admin.PasswordHash == string.Empty)

If the field is null, the object returned is DBNull.Value, but if the field is empty string, it's return as a System.String object. This makes it impossible to do regular "admin.PasswordHash == DBNull.Value" check, as that will fail whenever the field has been set to empty string. Is my example the right (and only) way to go?

Automatically redirect to HTTPS and check if SSL is active



I've set in the web.config:

    <!-- User Authentication -->
    <authentication mode="Forms">
      <forms loginUrl="~/Page/View/Content/Login.aspx" timeout="2880" requireSSL="true" />

This works fine. If there is no ssl connection, the login form doesn't continue. But I would like to check if ssl is active (in codebehind) and, if it's possible, to automatically the user to the https page if he's currently on http. (I could do this job by manually redirect with page.response("https://url.../login.aspx"); but this is not really generic. For example if the webapp is moved to another domain it doesn't work anymore... I'm looking for something like: FormsAuthentication.RedirectWithSSL(); or so... :D)


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