Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Wednesday, March 28, 2012

Control cpe_ClientState0 of type HiddenField must be placed inside a form tag with runat=s

What should i do ?

Hi,

is that control added dynamically? If so, drop a PlaceHolder control in the page and then add the control to that PlaceHolder.

control cannot be created because Visual Studio Cannot find the Controls type in the Contr

Hi Friends, I have installed Visual Studion 2005 on my machine. After creating an AJAX FutureRelese Web project. I tried to add Future Release Controls to my web page. I am getting the following error "control cannot be created because Visual Studio Cannot find the Controls type in the Control Assembly" Could you please get back to me with the solution for this. Thanks and Regards, Baburaj P V

Pls make sure you have System.Web.Extensions referenced. If Not Add it from the Reference Dialog, it is insalled in the GAC. If you also have the previous version then you have to modify the web.config.


It would be greatful, if I could know how to modify the Web.Conf. I have installed ASPDOTNETFutureRelease on Dot Net Fwk 2.0

Best Regards,

Babz


Try adding another entry for System.web.extensions for AJAX controls and prefix it in the control creation in web forms

control cannot be created because visual studio cannot find the controls type in the contr

Just installed Ajax extensions and ajax control toolkit for Vs2005.All fine.

I can drag drop update panel or script manager.

But if I do so with ajax toolkit controls I get a a error as : "control cannot be created because visual studio cannot find the control's type in the control assembly".

I have downloaded and worked with the toolkit at my home comp and it works all fine. But here at my work its giving me this problem.

I googled up to see any solutions but dint find much help!!

So any help with this would be appreciated!! Thanks!!


Hey guys!!

Anyone for the solution??


Did you remember to register it in the GAC? On your work PC, it may not have done that automagically.


Hey thanks for that.

It did work out.

Strange I have added toolkit on couple of PC's and never saw this error.

Just added the Dll to Gac and the problem is solved on my box.

Thanks.

Contacts sample Atlas application error

When I try to run the site locally, I get aConfiguration Error .

Server Error in '/Contacts' Application.

Parser Error Message:Could not load type 'Microsoft.Web.Services.WebResourceCompressionModule'. (c:\inetpub\wwwroot\contacts\web.config line 62)

Line 62 is:<add name="WebResourceCompression" type="Microsoft.Web.Services.WebResourceCompressionModule"/>

Also, I see this error in Visual Studio: Error 1 Type 'Microsoft.Web.UI.Controls.AutoCompleteProperties' does not have a public property named 'MinimumPrefixLength'. c:\inetpub\wwwroot\Contacts\DefaultFull.aspx 93

What do I need to modify here? Aren't these samples supposed to run without any tweaking?

Ooops...

Never mind. I just had to install the new March CTP of Atlas. I guess my installed version was a bit older.


Hi pmarangoni

The contacts\readme.txt has the following step to install and run the sample

ASP.NET 'Atlas' Contacts Sample


Setup
=====
Copy the following file:

C:\Program Files\Microsoft ASP.NET\Atlas\v2.0.50727\Microsoft.Web.Atlas.dll

to the Bin folder in the folder where you have the Contacts sample files.


Running the Sample
==================
1. Open Visual Studio

2. Open the Contacts project by following these steps:

a. In the "File" menu, click "Open Website."
b. In the "Open Web Site" dialog box, click the "File System" tab.
c. Navigate to the folder where you have the Contacts sample files, and
then click "Open".

3. Run the Default.aspx page.

4. Navigate in the GridView control.

Notice that paging or sorting does not require a postback.

5. Drag the "Add new contact" panel to a different location on the page.

6. Enter a new contact.

Note that the box provides auto-complete behavior.


Hi jhawk,

I've tried following the instructions on most of the samples, including the Contacts sample.I haven't gotten any Atlas sample to work. Some of them won't even compile because of javascript errors. Others have runtime javascript errors.

As far as Contacts go, "Default.aspx" doesn't use any Atlas. You have to run "DefaultFull.aspx". However, when I try to run the "DefaultFull.aspx" page, I get a runtime javascript error: "invalid argument".

I think the samples need some more careful review.

Saturday, March 24, 2012

Configuration Error: Could not load type..........

Hi all,

I have an issue with an AJAX.NET enabled web site that i have written. This site was completed and worked fine on our dev server, but then the dev server was rebuilt, and then the fun began. I have reloaded the site onto the newly setup server, installed AJAX.NET (the current version, which i also developed the site under). But the site will not load and i keep getting the follow error

Parser Error Message:Could not load type 'System.Web.UI.Compatibility.CompareValidator' from assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Source Error:

Line 51: </controls>Line 52: <tagMapping>Line 53: <add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="System.Web.UI.Compatibility.CompareValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>Line 54: <add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="System.Web.UI.Compatibility.CustomValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>Line 55: <add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="System.Web.UI.Compatibility.RangeValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

I have tried uninstalling and reinstalling AJAX.NET, Moving the 2 AJAX dll's into the projects BIN directory, and also manually putting the 2 AJAX dlls into the GAC, and nothing has made a bit of difference, and so im posting on here......

any help would be greatly appreciated!
Rob Earlam

The validators were removed from the latest release. The default Web.config that comes with the RTM release no longer has the validators in the <tagMapping> element.

Here is a pointer to a blog post that describes how you can download the compatibility validators:http://weblogs.asp.net/scottgu/archive/2007/01/25/links-to-asp-net-ajax-1-0-resources-and-answers-to-some-common-questions.aspx

Hope this helps,

Scott


All is working fine now

Thanks Alot
Rob


I am working on a team project.

On Other system they haven't got this error.

On my system I have commented the following lines in the web.config {locally}

<!--

<tagMapping>

<add tagType="System.Web.UI.WebControls.CompareValidator" mappedTagType="System.Web.UI.Compatibility.CompareValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.CustomValidator" mappedTagType="System.Web.UI.Compatibility.CustomValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.RangeValidator" mappedTagType="System.Web.UI.Compatibility.RangeValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="System.Web.UI.Compatibility.RegularExpressionValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.RequiredFieldValidator" mappedTagType="System.Web.UI.Compatibility.RequiredFieldValidator, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<add tagType="System.Web.UI.WebControls.ValidationSummary" mappedTagType="System.Web.UI.Compatibility.ValidationSummary, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</tagMapping> kamran

-->

Then I can't get this error.{I don't know why this error appear on my system and doesn't on other systems}

If i comment these line in my project which all team developer work what could be the result ?

What Should I do ?


Found that on other system there were old ajax installation were installed

So I uninstalled the latest ajax extension and install the old one.

Then as on other system enable the lines above then my application start working on my system.

Now What Should I do .Can I install the new extension on all systems and comments these lines on other system as well.

{I am asking it as Could it lead to some problems or not}

Configuration Error - Unrecoginzed Type

I built an Atlas site on my local machine then moved it out to the server and this is the error I receive. Any ideas?

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:Unrecognized attribute 'type'.

Source Error:

Line 13: -->
Line 14: <configSections>
Line 15: <sectionGroup name="microsoft.web" type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup">
Line 16: <section name="converters" type="Microsoft.Web.Configuration.ConvertersSection" requirePermission="false"/>
Line 17: <section name="webServices" type="Microsoft.Web.Configuration.WebServicesSection" requirePermission="false"/>

hello.

since you must surelly have the atlas dll in the bin folder, i must ask if you have configured IIS to run asp.net 2.0


Hi Luis:

Would you please see you can help with the following, I have EXACTLY the same problems as Ianem, and do not know what to do next.

Ianem posted:

“I installed atlas on my dev machine and everything works great. When I try
to get it working on the server, I get this error when building the page:
"Request for the permission of type 'System.Web.AspNetHostingPermission,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
failed"on the line where I have the ScriptManager tag. I set everything up
the same as I did on my dev machine, but nothing works. I added the
reference to the atlas dll in /bin. I registered the assembly on the page.
I installed atlas on the server. Does anyone know what I can do? Thanks.”

I had Microsoft.Web.Atlas.dll in the “bin” and evenScriptLibrary folder in the root of the project as MorningZ suggested, and yes it is configured IIS to run asp.net 2.0 but there is no different at all. Still get the same error messages.

Any suggestion and help is greatly appreciated!!!

Thanks.


I am receiving the same error. And, yes, IIS is running ASP.NET 2.0.

Does anyone have an answer for this issue? Thanks in advance!

...Jim...


hello.

this last error is different from the 1st one. in this case, we're speaking about a permissions problem, which normally occurs due to the fact that the bridgemodule is active. if this is the case, deactivate it or change the permission level of your app (through the <trust> element)


OK, Pardon my ignorance!

Note to self: Verify and THEN answer. I didn't have the site set to run ASP.NET 2.0. It's working now. Thanks!

...Jim...

Wednesday, March 21, 2012

Complex Type Serialization problem client -> server

I built a real simple sample that downloads an object to the client, then sends the object back up to the server. I love how easy this is, but there's a problem with the upload:
Here's what comes down:
{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West Wind","Entered":new Date(2005,8,25,1,10,16)}
and here's what goes back up:
{"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West Wind","Entered":{}}}
Notice the Entered date is no longer set isn't serialized properly - it's empty and on the server side a failure occurs.
This brings up another question: What hapens on an exception? Right now a 500 error and an HTML error page goes back. There's no trigger and no error nothing that happens on the client side page?
+++ Rick --More info...
The failure above doesn't seem to be related to the date field even - it looks like complex types do not marshall up at all. Even doing this on the client:

function btnSaveCustomer_Click()

{

var Customer =new Westwind.AtlasTest.busCustomer();

Customer.Name = document.getElementById("txtName").value;

Customer.Company ="West";

// Customer.Entered =new Date(2005,8,26,20,54,56);

alert(Customer.Entered);

Service = Westwind.AtlasTest.SimpleService.SaveCustomer(Customer,btnSaveCustomer_Click_Complete,btnSaveCustomer_Click_Complete);

returnfalse;

}

Fails. What goes up to the server looks right (I assume) and it's apparently picking up the type properly:

{"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}
Here's what I get back:

<html>

<head>

<title>error: Invalid object passed in, ',' or '}' expected. (69): {"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}</title>

<style>

body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}

p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}

b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}

H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }

H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }

pre {font-family:"Lucida Console";font-size: .9em}

.marker {font-weight: bold; color: black;text-decoration: none;}

.version {color: gray;}

.error {margin-bottom: 10px;}

.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }

</style>

</head>

<body bgcolor="white">

<span><H1>Server Error in '/atlastest' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>error: Invalid object passed in, ',' or '}' expected. (69): {"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>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>

<b> Exception Details: </b>System.ArgumentException: error: Invalid object passed in, ',' or '}' expected. (69): {"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">

<tr>

<td>

<code>

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.</code>

</td>

</tr>

</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">

<tr>

<td>

<code><pre>

[ArgumentException: error: Invalid object passed in, ',' or '}' expected. (69): {"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}]

Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeObject(JavaScriptString s, Type type, IDictionary`2 paramTypeInfo) +1103

Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeInternal(JavaScriptString s, Type type) +248

Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeObject(JavaScriptString s, Type type, IDictionary`2 paramTypeInfo) +673

Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeRequestParameters(String input, IDictionary`2 paramTypeInfo, IJavaScriptSerializationContext context) +107

Microsoft.Web.Services.RestHandler.ProcessRequest(HttpContext context) +92

Microsoft.Web.Services.HandlerWrapper.ProcessRequest(HttpContext context) +10

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +317

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

</pre></code>

</td>

</tr>

</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b> Microsoft .NET Framework Version:2.0.50727.26; ASP.NET Version:2.0.50727.26

</font>

</body>

</html>

<!--

[ArgumentException]: error: Invalid object passed in, ',' or '}' expected. (69): {"Customer":{"__serverType":"Westwind.AtlasTest.busCustomer","Name":"Rick","Company":"West"}}

at Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeObject(JavaScriptString s, Type type, IDictionary`2 paramTypeInfo)

at Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeInternal(JavaScriptString s, Type type)

at Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeObject(JavaScriptString s, Type type, IDictionary`2 paramTypeInfo)

at Microsoft.Web.Services.JavaScriptObjectDeserializer.DeserializeRequestParameters(String input, IDictionary`2 paramTypeInfo, IJavaScriptSerializationContext context)

at Microsoft.Web.Services.RestHandler.ProcessRequest(HttpContext context)

at Microsoft.Web.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context)

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

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


The Web Service is simple as can be for this:

[WebMethod]

publicbusCustomer GetCustomer()

{

//throw new SoapException("Failure dude!", SoapException.ServerFaultCode);

returnnewbusCustomer();

}

[WebMethod]

publicstring SaveCustomer(busCustomer Customer)

{

return Customer.Name;

}


Hi Rick,
I investigated this, and it is indeed a bug in the Atlas serialization code. In order for it to work correctly in its current form, you need to make sure that the fields you set into your client object (in your case Name and Company) have a matching publicproperty on the server object. Fields are not supported at this time, and maybe that's what you are using. If so, just switch to a property and you should be on your way. Thanks for reporting this issue, as it's definitely something we wnat to have fixed.
As for the fact that error reporting is lacking, it is one of those things that we didn't get to implement yet, but will be included in the next release.
Hope this helps,
David

complex return type

Hi all,

I have a WS that takes in simple parameters (decimal) and returns a complex type (custom object). I have tested the WS through a regular .aspx page and it works fine.

Now when I invoke through Atlas Javascript, I dont get any errors but my OnComplete method never gets called. Any ideas? How can I debug? I checked the IIS logs and it shows the post being made to the WS.

TIA!

Is this the same scenario as in your other post? Using fiddler can be very helpful to debug such issues. Also, make sure you have an onError handler registered in addition to your onComplete.

David


Yes, what it boiled down to was if I passed in a decimal type, for some reason the WS wouldnt work. I had to change Decimal to double and it worked.

What is fiddler and where do I get it?


Fiddler is an excellent tool that lets you look at http requests/responses so you can see what's going over the wire. You can get it fromhttp://www.fiddlertool.com/.
Would I install it server side/ client side or both?

Client side. It works by registering itself as an http proxy in the browser. It works automatically with IE, and can also work with Firefox with some manual configuration.