Click here to Skip to main content
15,886,919 members
Home / Discussions / Web Development
   

Web Development

 
QuestionIIS7 Not passing Headers? Pin
MaxRelaxman6-Feb-09 4:19
MaxRelaxman6-Feb-09 4:19 
QuestionHow to maintain row position in Gridview inside the panel? Pin
hifiger20045-Feb-09 12:20
hifiger20045-Feb-09 12:20 
QuestionMaking controls visible using javascript Pin
nainakarri5-Feb-09 5:29
nainakarri5-Feb-09 5:29 
AnswerRe: Making controls visible using javascript Pin
vaghelabhavesh5-Feb-09 6:04
vaghelabhavesh5-Feb-09 6:04 
GeneralRe: Making controls visible using javascript Pin
megivimal22-Jul-09 4:42
megivimal22-Jul-09 4:42 
QuestionOpen a Large pdf fomr sql database using vbscript, asp clasic Pin
DotNetCoderJunior5-Feb-09 3:00
DotNetCoderJunior5-Feb-09 3:00 
AnswerRe: Open a Large pdf fomr sql database using vbscript, asp clasic Pin
SeMartens5-Feb-09 21:11
SeMartens5-Feb-09 21:11 
QuestionDefaultValue in DataObject used in Webservice [modified] Pin
Roland Bär5-Feb-09 2:03
Roland Bär5-Feb-09 2:03 
Hi
we have a data object that is used in WindowsForm applications and should now be used also in a webservice. The data object has fields that have the attribute DefaultValue. With this attribute, accessing the web service fails with an error. Without the attribute it works.

This is the code (example code that causes the same problem):
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
    public Service ()
    {
    }

    [WebMethod]
    public Foo Test1(Foo foo) 
    {
        return foo;
    }
}

public class Foo
{
    private char bar;

    [System.ComponentModel.DefaultValue(',')]
    public char Bar
    {
        get { return bar; }
        set { bar = value; }
    }
}


And this is the error:

Server Error in '/TestWebService1' Application.<br />
--------------------------------------------------------------------------------<br />
<br />
The default value type, System.Char, is unsupported. <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.Exception: The default value type, System.Char, is unsupported.<br />
<br />
Source Error: <br />
<br />
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


How can I fix this without removing the attrribute, as it is used for changing the properties of a Control that is using this data object in the Visual Studio.

Thanks and greets
Roland

Additional Note:
The XmlIgnore attribute should not be used as it should be still serializable to an xml file.



Hi! I'm a signature virus. Copy me into your sig file and help me spread!

Follow your Euro notes in their tracks



modified on Thursday, February 5, 2009 8:26 AM

QuestionCreating a discussion board / forum Pin
NetQuestions4-Feb-09 20:44
NetQuestions4-Feb-09 20:44 
AnswerLook at DotNetNuke Pin
David Mujica5-Feb-09 3:01
David Mujica5-Feb-09 3:01 
GeneralRe: Look at DotNetNuke Pin
NetQuestions5-Feb-09 18:47
NetQuestions5-Feb-09 18:47 
GeneralRe: Look at DotNetNuke Pin
NetQuestions5-Feb-09 19:52
NetQuestions5-Feb-09 19:52 
AnswerRe: Creating a discussion board / forum Pin
NetQuestions9-Feb-09 18:51
NetQuestions9-Feb-09 18:51 
Questiondouble click on Grid Pin
omlac4-Feb-09 20:19
omlac4-Feb-09 20:19 
QuestionNamespace..JavaScript [modified] Pin
Amr M. K.4-Feb-09 2:32
Amr M. K.4-Feb-09 2:32 
AnswerRe: Namespace..JavaScript Pin
Jon Rista4-Feb-09 6:27
Jon Rista4-Feb-09 6:27 
QuestionDual Handle slider for web application [modified] Pin
mohit ag3-Feb-09 20:26
mohit ag3-Feb-09 20:26 
AnswerRe: Dual Handle slider for web application Pin
J4amieC4-Feb-09 3:00
J4amieC4-Feb-09 3:00 
JokeRe: Dual Handle slider for web application Pin
Jon Rista4-Feb-09 6:29
Jon Rista4-Feb-09 6:29 
GeneralRe: Dual Handle slider for web application Pin
mohit ag4-Feb-09 20:27
mohit ag4-Feb-09 20:27 
QuestionLocate an application Pin
Jason Lepack (LeppyR64)3-Feb-09 10:41
Jason Lepack (LeppyR64)3-Feb-09 10:41 
AnswerRe: Locate an application Pin
SeMartens3-Feb-09 21:35
SeMartens3-Feb-09 21:35 
QuestionOpening new window using clientscript.registerstartupscript() on clickin linkbutton Pin
nainakarri3-Feb-09 5:43
nainakarri3-Feb-09 5:43 
AnswerRe: Opening new window using clientscript.registerstartupscript() on clickin linkbutton Pin
vaghelabhavesh3-Feb-09 10:58
vaghelabhavesh3-Feb-09 10:58 
GeneralRe: Opening new window using clientscript.registerstartupscript() on clickin linkbutton Pin
nainakarri5-Feb-09 5:19
nainakarri5-Feb-09 5:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.