Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Wednesday, March 28, 2012

Why Microsoft done this in Ajax

Hello,

Till the time i have heard that Microsoft is releasing the ASP.NET AJAX i am excited that i have to just copy the dll's of this ASP.NET AJAX into my webapplication becaz earlier i have used Atlas products dll in my application , in that i just cpoied the dll into the bin folder of my application and its working perfect.

But i can't understand the reason why Microsoft have removed this feature from his new release ASP.NET AJAX, they know this that many websites running on hosted servers and they d't have permission to install any software on that server still they have done this,

Can any one explain me why they have done this is there any reason for this, Is ASP.NET AJAX not working fine in the din folder or Wht?

Now with ASP.NET AJAX you dont need to copy the ajax framework dll into the bin directory as you used to do with ATLAS. When ASP.NET AJAX was installed, these dll's will be installed directly into the GAC and all most all the hosting providers might have done this already. You just need to re-configure your web.config file and also keep track of the changes from ATLAS to BETA to RC which can be found at

Converting Applications from "Atlas" CTP to ASP.NET AJAX RC
Converting Applications from ASP.NET AJAX Beta 2 to ASP.NET AJAX RC

Its not that ASP.NET AJAX is not working fine with the bin folder. With each and every release, there will be changes like adding new functionality, bug fixing etc..,

Thanks

Why no Atlas Web Site template?

Hello -

Just getting started with Atlas. Downloaded and installed ASP.NET AJAX 1.0 Beta 2 and ASP.NET 2.0 AJAX Futures November CTP, but when I go to open a new Web site in VS2005, "Atlas" Web Site does not appear under My Templates (as the tutorials indicat should be the case).

What does appear under Installed Templates is ASP.NET Ajax-Enabled Web Site and ASP.NET Ajax CTP-Enabled Web Site. I chose the latter; however, none of the controls with the Atlas prefix (such as <atlas:ScriptManager>) are available to me through type-ahead.

Any suggestions on this are appreciated.

Eric

I just posted the same issue 15 minutes ago, Can please pass along any information if you come up with a fix.


In beta 2 version, prefix 'atlas' is replaced by 'asp'.
In beta 2 version, prefix 'atlas' is replaced by 'asp'. I am not sure what this means... Details please.

The responder means:

<atlas:ScriptManager>)

is now

<asp:ScriptManager>)


Does this mean that we no longer need the Atlas Web Site Template? Is it replaced with the ASP.NET AJAX-Enabled Web Site?
That is correct forget you even heard the word Atlas (its all Ajax now)
Thanks for the help. I am new at this programming and I have a lot to learn in a little time.

Hi,

When you install AJAX Extensions Beta2, It will adds some controls to Visual Studio2005 ToolBox.

So, open one ASP.NET website and click the ToolBox, goto AJAX Extensions Tab, click that Tab, it will show all controls which are newly installed.

All controls[UpdatePanel,..] will starts with 'asp'.

in design mode, drag-and-drop one control into the design view and goto the source view, there you will see the AJAX controls syntax.

Pradeep

Why Properties Sub Controls?

I don't understand why ACT always uses a special sub control within its controls.

Usually in ASP.NET controls are designed to have attributes on their own. Why this design?

TIA,

Axel Dahmen

Hi Axel,

The Toolkit sits directly on top of the ASP.NET AJAX Framework, which chose to use this approach. I think it's because this is how control extenders work in WinForms and they were going for a familiar approach - but this has actually been changed in the beta so that the properties, etc., have been moved up to the extenders.

Thanks,
Ted

Why Sys.Application does not work?

I just begin to learn ASP.NET AJAX. I have a simple question, please bear with me. I want to test client-side page life cycle. Here is my code. I don't know why pageInit does not get called? But pageUnload works.

Thanks a lot!

<head runat="server">
<title>Untitled Page</title>

<script type="text/javascript">
<!--
Sys.Application.add_init(pageInit);


function pageInit()
{
alert("Enter init page.");
}


function pageUnload()
{
alert("Page unloaded!");
}
//-->
</script>
</head>
<body>
<form id="form1" runat="server">

.....

Try putting your Sys.Application.add_init(pageInit) *after* you've defined your pageInit function.


I think I got a error that Sys is undefined. Did I miss including any namespace?

Thanks again!


The problem is fixed. I need to move <script> section after <asp:ScriptManager ID="ScriptManager1" runat="server" />, so that Sys can get reference.


I expierence the same problem, IE7 throws a javascript error "sys is undefined".

I did like you described and put the <asp:ScriptManager> section before my first <script> tag, but it doesn't help.

Have to put the ScriptManager section into my masterpage aspx file because of the <form> tag, could this be the problem?
In the browser output file of my aspx there are still <script> tags above the ScriptManager.

What can I do on this?


Check out this post for ideas about why you might get "sys is undefined":http://weblogs.asp.net/chrisri/archive/2007/02/02/demystifying-sys-is-undefined.aspx.

I guess it probably is the web configuration issue. Create a new AJAX-based web project, copy its web.config to your project to see if it works.

Why templating the content of the UpdatePanel?

Many ASP controls use template for their content (theGridView being a good example). TheUpdatePanel has aContentTemplate property that, as the name suggests, contains the content of the UpdatePanel.

Yet, since the UpdatePanel is not a repeater control, I do not grasp (as a consumer of the ATLAS library) the interest of templating the content of the UpdatePanel. Does some has an idea why a ContentTemplate is used instead of the regular control children?

Thanks in advance,
Joannès
http://www.peoplewords.com

hello.

i'd say that a template let's you have complete control over the content of the updatepanel. if you had a property of another type, you'd only be able to use elements of that type (or of a derived type)


ThePlaceHolder is not templated and but can include any element (as long as they inheritControl which is not a real constraint). My question can maybe be rephrased as "Why did the UpdatePanel not follow the PlaceHolder design pattern?".

Joannès

hum...how about designer integration? i'm not sure because i really don't use the designer, but can you drag-n-drop controls from the toolbox into a placeholder control?

Why to use asp.net ajax

Anthem.net is so simple to use on doesnot even have to write a line of code.

Why should we consider using msft asp.net ajax instead of anthem.net ?

thanks

Because ASP.NET Ajax is part of the .Net framework, so you are assured of support, documentation and continued development (and a huge and growing amount of tutorials etc from users). That can never be said of Anthem.Net. What happens if the creator just gets bored with it one day?


do we have to write lines of javascript code with asp.net ajax version?

Thanks for your help


No you don't have to. You can use its basic functionality without writing one line of code. You can also use all the extenders in the control toolkit without writing any javascript. However, you can also customise the behaviours as much as you want by adding some javascript. Watch some of theAjax videos here

Why use Asp.Net Ajax

I am debating between using Asp.Net Ajax and "regular" Ajax. As of now I have used Ajax by writing the javascript files and the web service/web pages that does the XmlHttpRequest.

So my question is what benefit would I get from using Asp.Net Ajax.

For the most part, AJAX is AJAX. ASP.NET would be your deciding factor, over a different technology. But if you're currently using ASP.NET and creating the AJAX functions by hand, the toolkit will alleviate the need for hand coding.

Jeff


How does the toolkit render the page, if I add some Asp.Net Ajax tools to an already existing Asp.Net page will my viewstate get bigger, will Microsoft add some code to the page to make it work that I don't know about.

ASP.NET AJAX - it's easy, quick and it's fun. :)

You can use notepad to write your .NET application, but you can use the Visual Studio ...

You can do AJAX functionality by hand, but you can use ASP.NET AJAX...


with asp.net you pass beyonde web pages u build web applications wth easy use of ADO.NET and so on... I would suggest you to try asp.net.. enjoy exploring cause this is basicliy what I'm doing...


It's a good question.

The thing is ASP.NET AJAX gives you all these things with a Microsoft Support team behind it:

1) Client side AJAX API - probably much like the one you've written but almost certainly far, far bigger. It can also call SOAP Web Services, Static aspx Page methods, serialize and deserialize objects and supports "classical class inheritance" with interfaces. It's a pretty good client side API and has had some very clever people develop it. The CTP also has a taster of even more ambitious Client APIs like XmlScript, DataTables and DataSources. Its not perfect by any means but I understand the next version of Visual Studio will include full Javascript intellisense for it which could be very cool indeed - especially if it alo makes it into the Express versions of that product (which I would expect it to).

2) Server Side API - Based around the Script Manager and UpdatePanels mostly. Update Panels are rediculously easy to use although FAR from optimal AJAX but have the huge benefit of "degrading" to a normal postback if Javascript is disabled. Conversely, the Bandwidth used for SOAP WebMethods could hardly *BE* more optimal, using pure Json up and down the pipe - fantastic value for money!!

3) Client Server integration: easily pass objects from client to server and back again.

4) Ajax Control toolkit - a set of Widgets to easily add cross browser GUI controls that take advantage of AJAX

5) Provides a defined Ajax Framework which is backed by microsoft, something non of the other frameworks can offer. The more popular ASP.NET AJAX becomes, the more community it gets and the better it gets. Dojo, Prototype, Bindows are all great but will always remain a little marginalised by something like ASP.NET AJAX.

6) This community and others like it.

I think it's fair to say that given where ASP.NET 2 used to be, with its postback architecture to where it is now (with ASP.NET AJAX) I think is a great improvement indeed, just the act of popping an update panel on an existing ASP.NET page can transform it from being humdrum and ordinary to something with much greater response and even "Wow" factor as it will only do a partial render (less bandwidth), there is no flicker (as the page does not get discarded) and the page scroll position does not need to be affected. 100% better already.

I would also say that although much of it comes across as "Ajax for dummies" (although you could also say that about the other Ajax frameworks out there) I think there is plenty of scope there also to create nice, optimal interfaces, additional toolkit widgets and other reusable AJAX enabled objects but the real key is the support and the continued development by some very, very talented people. Fundamentally I think the "ASP.NET" thing gets in the way of the "AJAX" thing and can make things far more complex than they need to be but ultimately, if you are using Visual Studio (full or express) and are creating Web Applications or dynamic sites then ASP.NET AJAX is the way to go.

Or to put i another way, what do you think will get you your next job in a programming team, saying you've written this killer AJAX framework and use it all the time and it "works great form me", or saying that you have mastered the "industry standard" AJAX toolkit and can leverage the knowledge therein, and which may well be the AJAX toolkit your next employer is already using? Trust me when I say I was in that position offering the former, I showed them my widgets, my treeview, my resizer bars, my fake windows, my serialization objects, my lazy loading, my drag and drop, my menuing system, my eventing system, my animation system, even my 2D and 3D graphics engine, all pure javascript and all built in - yes I got the job but had to promise to learn ASP.NET AJAX straight away if I wanted to do that kindof thing (ie: it's industry standard and the other developers can then work on my code, ie I remain dispensible, which is what they want).


Just the answer I was looking for.

VR2 you said:

"yes I got the job but had to promise to learn ASP.NET AJAX straight away if I wanted to do that kindof thing"

For you to learn straight away what books/websites, if any, did you use to move from your old way of writing ajax apps to Asp.net Ajax?


Another question:

Is there any speed difference when using Asp.Net Ajax compared to other Ajax Frameworks, and does anyone know if search engines look at the pages differently.


You can start from

http://ajax.asp.net/docs/

http://ajax.asp.net/documentation/default.aspx?tabid=47


"For you to learn straight away what books/websites, if any, did you use to move from your old way of writing ajax apps to Asp.net Ajax?"

I got a book called "Programming Atlas" which I nearly threw out in disgust until I was told that the stuff it talks about still exists but in the CTP (and in a modified form). Also this website has been invaluable. I have to say though that I'm still just finding my feet not only with this but with ASP.NET also (I previously used COM, VB6, asp classic & javascript).

As to the speed of ASP.NET AJAX - I'd imagine that it depends what you are comparing it with and *how* you are doing it.

In general UpdatePanels will be slow and clunky (by comparison) but will offer extreme ease of use and a server based event architecture using the well established and frankly huge ASP.NET 2. And it will degrade for the mobiles etc!

Web Services and Static Page Methods will be fast and nimble but - what do you DO with the data once you have it? This is where you need a strong client side API (widgets) to display and allow the user to manipulate the data WITHOUT needing update panels to post back the viewstate every click (so that server events can fire and update the server version of the page DOM and send it all back again).

And this is where the CTP could come into play, just so long as you don't need to be able to downgrade for Mobile Phones! For example, I did an experiment using the CTP client side DataSource and DataTable - and a server side DataService or WebService (wrapping calls to a TableAdapter) where you could simply instatiate these objects on the client and have a grid that was effectively 2 way databound to the datasource, meaning that the user could update any data in the grid they wanted and the DataSource would post only the changes back to the server using JSON. The custom grid object tool a while to write as an extender in the AjaxToolkit but once written, in 2 minutes you could have this up and running and it was as optimal as you like.

Monday, March 26, 2012

Wildcard Extensions, RewritePath and /jsdebug

What we have here is not an unusual situation, but not a common one.

We are using a wildcard extension mapping ".*" mapped to the asp.net (2.0) isapi library. We're doing this so that we can do UrlRewriting without using a seperate ISAPI extension and so that we can handle url rewrites on directories and configure the rewrites using the website's local web.config.

We have sections for exceptions on file extensions and directories, and overall this works really well... until we have to implement asp.net ajax.

Because asp.net ajax's ScriptManager defines the script in html as src="http://pics.10026.com/?src=ws/WebService.asmx/jsdebug" IIS sends this request to ASP.NET, which then looks for that directory path, and naturally, it doesnt exist.

So it throws a nasty ASP.NET 404 error when attempting to viewhttp://siteurl/ws/WebService/jsdebug.

I'm going to go out on a limb here and assume that whatever mechanism the asp.net ajax library is using to generate this javascript is being interrupted by all requests coming to the aspnet_isapi library. When I disable the wildcard extension mapping, everything works as it should.

ASP.NET AJAX Developers! How can I work around this limitation, using our current setup?

Hi,

I fail to reproduce the issue. Can you show me your code?


I am also using wildcard extension and UrlRewriting and I have no problem with that.

Maybe this is due to the fact that I added this line to my web.config (in order to solve another problem):


<add verb="*" path="*.js" type="System.Web.StaticFileHandler"/>

this must be placed in the "system.web" then "httpHandlers" section.


I'm experiencing the same exact problem. In fact, this problem even occurs when UrlRewriting.Net is disabled. I'm currently running ASP.NET 2.0 on Windows 2000 with IIS 5.0.

When I define the wildcard extension mapping, ScriptService URLs (e.g. xxxxx.asmx/js, xxxxx.asmx/jsdebug, and xxxxx.asmx/MethodName) all fail to work.

However, when I remove the wildcard mapping, everything works again.

One interesting I noticed is the way how IIS handle urls like "xxxxx.asmx/js" under the "no wildcard extension mapping" default IIS configuration.

For a URL like "xxxxx.asmx/js", I had expected it to fail under the default configuration since it should technically treat the URL as an extension-less url. Instead, it seems like IIS progressively traverse the path nodes and check to see if a node in the path resolves to an actual file. And if it does, it changes the requested path from "/xxxxx.asmx/js" to "/xxxxx.asmx" and stuffs the "/js" part as the "PathInfo" request header. (http://msdn2.microsoft.com/en-us/library/system.web.httprequest.pathinfo.aspx)

It seems like when wildcard extension mapping is turned on, IIS disables that behavior and forwards the request to ASP.net without parsing the requested path.

Does this make sense?

-David


I figured out why.

This misbehavior can be reproduced on IIS 5.0 (Windows 2000) and IIS 5.1 (Windows XP Pro). It does not effect VS's development server nor IIS 6.0.

When IIS 5.x sees a URL like this "/webservices/helloworld.asmx/js", it splits them into token and iterates through them from left to right. For each token, it checks to see if it ends as a string that matches an extension mapping. As soon as it finds it, it stops. At this point, before IIS forward the request to ASP.Net's ISAPI extension, it takes that finding and creates two server variables: URL and PATH_INFO.

For example, the following URL:

"/webservices/helloworld.asmx/js"

would cause IIS to define the following server variables:

SERVER_VARIABLE["URL"]: "/webservices/helloworld.asmx"
SERVER_VARIABLE["PATH_INFO"]: "/webservices/helloworld.asmx/js"

Similarly, a URL like this:

"/nonexistent.aspx/helloworld.asmx/js"

would cause IIS to define the following server variables:

SERVER_VARIABLE["URL"]: "/nonexistent.aspx"
SERVER_VARIABLE["PATH_INFO"]: "/nonexistent.aspx/helloworld.asmx/js"

When you turn on IIS 5.x wildcard extension mapping, this logic never gets executed. Instead, IIS defines the URL server variable the same way it defines PATH_INFO (i.e. nothing is stripped out).

ASP.Net does not like this. Without URL rewriting, ASP.Net doesn't know how to handle the request "/webservices/helloworld.asmx/js". Because of this, ASP.Net forwards the request to the FileNotFound http handler which displays the 404 error page we see.

Again, this only applies to IIS 5.x and not IIS 6.0. IIS 6.0 seems to have reworked this logic in the expected way.

To solve this problem, create a file called IIS5XWildCardExtensionFix.cs and place it in your App_Code folder:

using System;using System.Web;public class IIS5XWildCardExtensionFix : IHttpModule{public IIS5XWildCardExtensionFix() { }public void Dispose() { }public void Init(HttpApplication context) { context.BeginRequest +=new EventHandler(OnBeginRequest); }private void OnBeginRequest(object sender, EventArgs e) { HttpApplication app = senderas HttpApplication; HttpContext context = app.Context;string path = context.Request.Path;int asmx = path.IndexOf(".asmx/", StringComparison.OrdinalIgnoreCase);if (asmx >= 0) context.RewritePath( path.Substring(0, asmx + 5), path.Substring(asmx + 5), context.Request.QueryString.ToString()); }}


Add the following line to in your web.config file in the HttpModules tag:

<add name="IIS5XWildCardExtensionFix" type="IIS5XWildCardExtensionFix" />

This code inserts the missing logic using ASP.Net's HTTP Module framework.

This code is derived from djMax'spost.

-David


Fantastic work. I really appreciate you diving into this logic and figuring out the problem. We are, in fact, running XP Pro on most of our development machines.

I'll be giving this fix a shot next week Monday and will report back with my findings.


I tried this solution without luck :\ Will create a new thread with the info.

Basically, removing the wildcard extension mapping fixes the issue, but we need to retain that mapping, so since adding it we are getting the 'Sys is undefined' error indicating the client is not receiving the .js file.


You don't have to remove the wildcard extension mapping. In fact, this code is meant to address the issue introduced by defining the wildcard extension mapping.


Here is the .vb we used, and included the tag in our web.config

Imports System
Imports System.Web
Imports Microsoft.VisualBasic

PublicClass IIS5XWildCardExtensionFix
Implements IHttpModule

PublicSubNew()
EndSub

PublicSub Dispose()Implements System.Web.IHttpModule.Dispose
EndSub

PublicSub Init(ByVal contextAs System.Web.HttpApplication)Implements System.Web.IHttpModule.Init
AddHandler context.BeginRequest,AddressOf OnBeginRequest
EndSub

PrivateSub OnBeginRequest(ByVal senderAsObject,ByVal eAs EventArgs)
Dim appAs HttpApplication =CType(sender, HttpApplication)
Dim contextAs HttpContext = app.Context
Dim pathAsString = context.Request.Path
Dim asmxAsInteger = path.IndexOf(".asmx/", StringComparison.OrdinalIgnoreCase)
If (asmx >= 0)Then
context.RewritePath(path.Substring(0, asmx + 5), path.Substring(asmx + 5), context.Request.QueryString.ToString())
EndIf
EndSub

EndClass


understood, thank you. We aren't able to remove the wildcard mapping which is why I am attempting this workaround. So far no luck, but thank you for your help thus far.


Are you guys stripping out ".asmx" during the URL rewriting process?

This will not work:http://yoursite.com/ws/WebService/jsdebug
This will work:http://yoursite.com/ws/WebService.asmx/jsdebug

What's the src attribute in your aspx page's script tag?


we are not actually rewriting urls, we are securing documents in particular directories using forms authentication. In order for this to work for documents other than aspx files, we needed to add the wildcard application mapping. I tried specifically granting access the ScriptResource.axd and WebResource.axd files in the web.config per other posts suggestions but nothing has yet worked. I can provide url if it's allowed, or email it...


buddydvd2:

I'm experiencing the same exact problem. In fact, this problem even occurs when UrlRewriting.Net is disabled. I'm currently running ASP.NET 2.0 on Windows 2000 with IIS 5.0.

When I define the wildcard extension mapping, ScriptService URLs (e.g. xxxxx.asmx/js, xxxxx.asmx/jsdebug, and xxxxx.asmx/MethodName) all fail to work.

However, when I remove the wildcard mapping, everything works again.

One interesting I noticed is the way how IIS handle urls like "xxxxx.asmx/js" under the "no wildcard extension mapping" default IIS configuration.

For a URL like "xxxxx.asmx/js", I had expected it to fail under the default configuration since it should technically treat the URL as an extension-less url. Instead, it seems like IIS progressively traverse the path nodes and check to see if a node in the path resolves to an actual file. And if it does, it changes the requested path from "/xxxxx.asmx/js" to "/xxxxx.asmx" and stuffs the "/js" part as the "PathInfo" request header. (http://msdn2.microsoft.com/en-us/library/system.web.httprequest.pathinfo.aspx)

It seems like when wildcard extension mapping is turned on, IIS disables that behavior and forwards the request to ASP.net without parsing the requested path.

Buddydvd2. I think I have very similar problem you are experiencing, but littel different. Enabling IIS Wildcard makes Ajax Toolkit Slides control not working. I have posted the problem here, please take a look:http://forums.asp.net/t/1129701.aspx

I have tried to apply your logic to axd files, but that did not help

Please help anybody


buddydvd2:

Are you guys stripping out ".asmx" during the URL rewriting process?

This will not work:http://yoursite.com/ws/WebService/jsdebug
This will work:http://yoursite.com/ws/WebService.asmx/jsdebug

What's the src attribute in your aspx page's script tag?

This is the source I have on my page for Slides Control in Ajax Toolkit:

<script src="http://pics.10026.com/?src=/Ajax/WebResource.axd?d=BP8NIIT9ZyjyxNDvn4jUWQ2&t=633144946505000000" type="text/javascript"></script>


<script src="http://pics.10026.com/?src=/Ajax/ScriptResource.axd?d=OjqU9cYdOHT3Lc3mu9VgciBgwPmofPtVg5ti2UT6BGvFCwWflQSi8HHOJb5SHbTBOpqi8xLjNGpMCKeePlMrcNXw15AoxwpCVLq3SBhMer81&t=633144934480000000" type="text/javascript"></script>

Please help


Hi Rafal,

Try your solution on a machine with IIS 6 installed. The error you're getting is most likely caused by IIS 5.x. The error response you got, "HTTP verb POST not allowed", says that the request didn't even get routed to ASP.Net's ISAPI extension module yet.

Also, make sure you select "All verbs" in the extension mapping dialog for your wildcard mapping (i.e "*.").

Hope that helps,
Good luck.

-David

window.onerror and Toolkit

I am implementing logging of client-side errors to ASP.NET Health Monitoring using a technique similar to this one:

http://www.newtonsoft.com/blog/archive/2006/05/02/Logging-JavaScript-Errors-To-ASP.NET.aspx

This code adds a client-side handler to window.onerror, and posts via xmlHttp to an HttpHandler that logs the exception via Health Monitoring. To test, I have a page with a simple javascript error (<a href="http://links.10026.com/?link=http://forums.asp.net/AddPost.aspx?ForumID=1022#" onclick="throw 'test exception';">Throw error</a>) AND a Ajax Control Toolkit Calendar extender with OnClientHide set to throw a test exception.

This works in both FireFox and IE for the most part, but there are a few issues I'm having trouble getting to the bottom of:

-In IE the message is "Exception Thrown and Not caught". I would prefer to get the actual message. In FF, the message is "uncaught exception: test exception", which is more useful IMO. How can I
get the actual message in IE javascript?

-In FireFox, the "simple" example above works, but in the "Ajax Control Toolkit Calendar" example, the error is displayed in the FF error dialog, but not caught by window.onerror. It acts as if there is something intercepting the error and not causing it to fire "onerror". I've looked in the source and docs, but can't find where that would be. Any ideas how to get this working with MS Ajax + toolkit?


Have you considered using the MS AJAXsupport for exceptions. Instead of throw 'test exception' you could have Error.create('testException') and in the handler get the message.

Regarding the window.onerror event not getting fired in the Calendar case, could you post a small example that we could try out?


Thanks for the reply and link... 'throw Error.create(...);' does help address the first issue, where IE wasn't returning the actual error message. I'll have to see about the best way to implement this, since it may be used in some cases on pages that do not use MS Ajax, in which case Error.create() wouldn't exist. Also, though, I don't always have control over the error that is thrown. For example, if there were an error in a 3rd party control's javascript, then it may not use this pattern to throw exceptions...

I'm still finding the behavior different between IE and FF inside a CalendarExtender. Below is an example. You'll need to copy into a project that references MS Ajax & Ajax Control Toolkit and modify the @.Page tag to get it to work.

In this case I'm just handling all errors and showing a messagebox. (In the real code, I post it via xmlHttp to an HttpHandler...). In FireFox, the behavior is that the "Simple Example" works as expected, while the "Ajax Example" does not result in a call to window.onerror. The weird thing is that FireFox does in fact register an exception in the Error Console (Ctrl-Shift J), but somehow it skips window.onerror.

Thanks again for your help!

<%@. Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ClientLoggingSpike._Default" %><%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title> <script type="text/javascript"> window.onerror = function(message, url, line) {alert(message + ":" + url + ":" + line);}; function throwTestException() { throw Error.create('Test Exception'); } </script></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server" /> Simple Example<br /> <a href="#" onclick="throwTestException();">Throw Exception</a><br /><br /> Ajax Example<br /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Calendar" /> <cc1:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="Button1" TargetControlID="TextBox1" OnClientHidden="throwTestException"> </cc1:CalendarExtender> </div> </form></body></html>

I see the issue however I am not sure why FF is causing that. TheASP.NET AJAX team may know more about this since they work encapsulating these browser eccentricities. You might get an answer on their forum.
Thanks for your help. I've posted over there and will see what they say.

window.opener.document.TextBoxRateLockDate is null or not an object

My ASP.Net page has a calendar picker link with an onclick event as shown below:

<a href="http://links.10026.com/?link=javascript:;" onclick="calendarPicker('TextBoxRateLockDate');" title="Pick Date from Calendar"><img src="http://pics.10026.com/?src=../../../../App_Images/simplecalendar/calendar.gif" border="0" /></a>

The above link is inside of a MultiView control, which is inside an UpdatePanel control. The link pops-up the date picker calendar just fine but when I select a date , I get the following error:

Microsoft Jscript runtime error:
'window.opener.document.TextBoxRateLockDate' is null or not an object

How can I resolve this issue?

Hi,

This is a pure javascript issue.

I'd suggest using document.getElementById() method to find the textbox. Usually like this: window.opener.document.getElementById("TextBoxRateLockDate")

Hope this helps.

Windows 2000 Server

Does ATLAS run on Windows Advanced server 2000?

This server is now serving up ASP.NET pages and I dont need any additional functionality ?

But using ATLAS would be greet.

I can see in the specs for the March CTP it only runs on 2003 Server and higher but is this realy the case?

Atlas will run on any platform that can run ASP.NET 2.0, so you should be fine.

David

Windows Integrated Authentication prompting for password, Ajax calls are fully qualifying

Alright, here's my very strange story: I have an ASP.NET 2.0 webapp that utilizes Ajax, for some reason even if I type in "http://ServerName/DirectoryName" it will prompt for a password and it will show "Connect to ServerName.DomainName.com" instead of just "Connect To ServerName". If I choose not to authenticate it will still load the page, but none of the Ajax stuff will load, and on any ajax asynch callbacks it will prompt me to authenticate again. Also, I have manually added the fully qualified server url to my Local Intranet zone and am still getting prompted, and I have tried (just for troubleshooting) to set the Authentication settings for my Internet zone to always send username and password information, but it still prompts me for a username and password! Any help would be greatly appreciated, my biggest question iswhy are my Ajax callbacks using the fully qualified url instead of the shorter one I actually typed in?

Thanks!

Mark Ransom

So I've been hacking through this for weeks now (on and off) and as soon as I post my question to this forum I figure out what's wrong. Basically in Internet Explorer under Advanced Settings there's an option that says "Enable Integrated Windows Authentication", which you would think would need to be checked for this type of authentication to work correctly. You'd think so, and you'd be wrong (at least in my situation) because unchecking that box and restarting IE allowed my users to log directly into my app and all my Ajax calls work without prompting for authentication. This may or may not be of use to anyone else, but it took me a lot of head banging (against a wall) to figure out this backwards fix.

Thanks

Mark

Wireless troubleshooting

Hi,

I have a website (asp.net - ajax) hosted in a computer. I can access it through internet. Everything works fine except when the client computer has wireless mouse, when i access the website with that kind of machine the mouse cursor get very slow. I accessed thewww.asp.net web site and got the same problem. Seems to be an AJAX incompatibility.

Any suggestions?

Thanks

Fcvl

Ajax has nothing to do with hardware nor the mouse.. asp.net has been going through some upgrades live (I would presume) - no anything that is being slow is either the connection the pc in question has and is really slow or the device driver for the mouse (or maybe the mouse is low on battery juice) would be the issue...

Saturday, March 24, 2012

Wizard Control with Validation in UpdatePanel

Hi, I met a problem that I don't know how to solve when using a Wizard control with Validation in updatePanel. I am using ASP.NET 2.0 and ASP.NET 2.0 AJAX Extension 1.0. Below is the sample code and the problem I had is that after I went to Step 2 if I click Previous Button to go back to Step 1, the validator is not showing its validation result. Did I do anything wrong in my code? Would appreciate if anyone could help! Also, got a side question that how do I preserve the value in a password TextBox if I am going from Step 2 to Step 1, i.e. if the TextBox1's TextMode is set to Password, is there anyway to preserve its value?

<

formid="form1"runat="server">
<asp:ScriptManagerID="ScriptMan"runat="server" />
<asp:UpdatePanelID="UpdatePanel1"runat="server">
<ContentTemplate>
<asp:WizardID="Wizard1"runat="server"DisplaySideBar="false">
<WizardSteps>
<asp:TemplatedWizardStepID="TemplatedWizardStep1"runat="server"StepType="Start"Title="step 1">
<ContentTemplate>
Step 1<br/>
ASDF:
<asp:TextBoxID="TextBox1"runat="server"></asp:TextBox>
<asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="TextBox1"ValidationGroup="asdf"ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
</ContentTemplate>
<CustomNavigationTemplate>
<asp:ButtonID="StepNextButton"runat="server"CommandName="MoveNext"Text="Next"CausesValidation="true"ValidationGroup="asdf"/>
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
<asp:TemplatedWizardStepID="TemplatedWizardStep2"runat="server"StepType="Finish"Title="step 2">
<ContentTemplate>
Step 2
</ContentTemplate>
<CustomNavigationTemplate>
<asp:ButtonID="FinishPreviousButton"runat="server"CausesValidation="False"CommandName="MovePrevious"Text="Previous"/>
<asp:ButtonID="FinishButton"runat="server"CommandName="MoveComplete"Text="Finish"/>
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
<asp:TemplatedWizardStepID="TemplatedWizardStep3"runat="server"StepType="Complete"Title="Complete">
<ContentTemplate>
Complete
</ContentTemplate>
<CustomNavigationTemplate>
<asp:ButtonID="ContinueButton"runat="server"CausesValidation="False"CommandName="Continue"Text="Continue"/>
</CustomNavigationTemplate>
</asp:TemplatedWizardStep>
</WizardSteps>
</asp:Wizard>
</ContentTemplate>
</asp:UpdatePanel>
</form>Hi, my bad that I did not do enough researching before this posting, the problem has been resolved after I fonudthis blog entry of Matt Gibbs. It turns out that it is a known issue perhttp://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx, and the workaround is to disable ClientScript of the validator controls. However, if you don't like the round trip traffic, Matt has posted Ajax Validators. I was not aware of this since I did not join the beta/CTP of the ASP.NET AJAX.

Validators are not compatablw with ASP.NET AJAX Final version..

Check this link

http://weblogs.asp.net/scottgu/archive/2007/01/25/links-to-asp-net-ajax-1-0-resources-and-answers-to-some-common-questions.aspx

You can download the stable version of Validators from here

http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx


Johnny, I am curious if you ever found a solution to your other problem about losing the password value going from step 1 to step 2. I am currently facingt the same issue and I have found no answers.

I am casting the password box in the following way:

// make reference to the password step
TemplatedWizardStep passwordStep = SelectPasswordStep;

// password step
TextBox PasswordChoice =
(TextBox)passwordStep.ContentTemplateContainer.FindControl("Password");

Response.Write(PasswordChoice.Text);

When I have the Password control set as textmode=password the text value returns blank. No error, just an empty value. When I have the textmode as singleline it works. Something about a textmode of password seems to make the control lose its value. Anybody have any ideas. Is this a bug or by design for some Redmond reason?

- jq



Chetan, thanks for you replay.

Jq, I was not working the "side problem" right now, however, I think you can preserve the actuall password string when going from step 1 to step 2, and when you go back to step 1, u could assign the password back to textbox. I guess it's not a bug and should be deisgned to be that way for security reason. I hope the work around could work, if you are going try this out, please let me know the result. Thanks.


I actually wasn't even able to get to this point. My problem is that I can't do ANYTHING with the password textbox control. Moving to the next step, referencing the control via code-behind, or anything -- once I have moved past the step with the password control, I lose the value.

So when I'm at the end of the wizard and I'm creating my account, I have lost my password value. So I can't even create the account, making my entire wizard useless. With your solution, can you read the value of the password field? If so would you mind posting your code?

Thanks,

JQ

Workarounds for AutoCompleteProperties

ASP.NET AJAX 1.0 no longer allow AutoCompleteProperties section. I used to have one AutoComplete Extender maps to 3 controls calling the same WebService. What's the new way to do it in this new build apart from creating more AutoComplete Extenders?

Now you must have 3 AutoCompleteExtenders because extenders now maps to their target control directly. All this extenders can use the same web service.

Hope, this helps.

Working Ajax asp page installed on Win2003 server gives scriptmodule error due two two ver

LS,

I'm using VS2005 C#. I installed VS 2005 SP1 and than I installed Ajax support.

I made my website and on my development PC it works.

On my windows 2003 server (with the windows 2003 SP1 installed) I have no VS (so no VS 2005 SP1), it is just a server.

The older version of my website without Ajax is perfectly accessible through the internet. However when I install my new website (I first did install the Ajax setup.MSI and the ASP.net 2 redistributals were already installed as they were needed for my previous version of the website) my website is no longer accessible, it produces an error.

When I now access my page through the internet from my server I get the following configuration error (in the web.config file):

<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Should I copy System.Web.Extensions.dll from my development PC to the server (if so where to?)

My guess is that there should be no need to manually copy files, so what is the problem. Is there a different setup to install Ajax support on a Windows 2003 server?

I hope someone has the answer and is willing to help me.

Kind regards

Clemens Linders

I found a thread stating that I needed to copy the System.Web.Extensions.dll's to the bin folder of my project and than publish the website.

So I did and luckily the error above was gone, unluckily I got another error (seems a lot like the first one but the error above originated from the web.config file and this originates from the ASPX file).

I still hope anybody can give me a clue.

The error is (unfortunately partially in dutch, I put a translation between the curly brackets {}):

Serverfout in toepassing /.

Parser-fout {Parser-error}

Beschrijving:Er is een fout opgetreden bij het parseren van een bron die vereist is om aan deze aanvraag te voldoen. Raadpleeg de volgende details van deze parser-fout en pas het bronbestand waar nodig aan. {Description: there was an error ......}

Parser-foutbericht:Kan bestand of assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 of een van de afhankelijkheden hiervan niet laden. De manifestdefinitie van de gevonden assembly komt niet overeen met de assembly-verwijzing. (Uitzondering van HRESULT: 0x80131040){Parser-errormessage: Cannot load the file or assembly System.Web.Extensions...or one of it's dependancies. The manifestdefinition of the found assembly doesn't concur (isn't the same) as the referenced assembly}

Fout in bron: {error in source}

Regel 3: <%@dotnet.itags.org. Register Assembly="WebChart" Namespace="WebChart" TagPrefix="Web" %>Regel 4:Regel 5: <%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"Regel 6: Namespace="System.Web.UI" TagPrefix="asp" %>Regel 7:


Bronbestand:/Default2.aspx Regel:5

Laadtracering van assembly: U kunt de volgende informatie gebruiken om vast te stellen waarom de assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35niet kan worden geladen.

WRSCH: registratie van assembly-bindingen is uitgeschakeld.Als u assembly-bindingsfouten wilt registreren, stelt u de registerwaarde [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) in op 1.Opmerking: er is een prestatiestraf gekoppeld aan de registratie van assembly-bindingsfouten.Als u deze functie wilt uitschakelen, verwijdert u de registerwaarde [HKLM\Software\Microsoft\Fusion!EnableLog].

It is as if it's complaining about a wrong version but I only downloaded ONE version of Ajax and I only have this version on both my development PC as deployment server.

On this site I also found a thread regarding this parser-error. In that thread someone asked if AjaxControlToolkit.dll was installed. I do not have a AjaxControlToolkit.dll (I do have AjaxExtensionsToolbox, but also copying that into the bin-map didn't help). Furthermore the same solution was offered to copy the System.Web.Extensions.dll't to the project's bin folder. Luckily for that person it did the trick for him, but I already did this. Another option that was mentioned is to give the command gacutil -f system.web.extensions.dll. So I copied gacutil to the bin-folder of my server. from CMD (DOS) I executed gacutil -f system.web.extensions.dll

And the result was: system.web.extensions.dll is an invalid option?? (it is in the same bin-folder)

I also downloaded and installed The AjaxControlToolkit. I put the AjaxControlToolKit.dll in the bin-folder of my project, I published the website and still I get this error.

So to repeat in short what I did was:

I installed Ajax both on my developer PC and windows server 2003 deployment pc. I copied system.web.extensions.dll + system.web.extensions.design.dll + AjaxControlToolkit.dll (+ some other dll's) to the bin-folder of my project. I published the website to my server and still I run into problems.

Any ideas?

Kind regards,

Clemens Linders

-------------------------------

Update on my problem (unfortunately it is still there)

As some people in this forum mention that they also have VS installed on their server I installed VS 2005 on my server.

Than I installed the VS80 SP1 update and than I installed Ajax ASP.NET2 version 1.00

I even ran gacutil /i system.web.extensions.dll (also for the design dll)

As my problem persisted I copied the source of my website to this VS and compiled it (the system.web.extensions dll's and the AjaxControlToolkit.dll copied to the bin-folder). Surprisingly enough it did not compile and came up with more or less the same error.

Maybe this will help someone to identify my problem?? Is it an installation issue??

The error I got was:

Error 1 Kan bestand of assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 of een van de afhankelijkheden hiervan niet laden. De manifestdefinitie van de gevonden assembly komt niet overeen met de assembly-verwijzing. (Uitzondering van HRESULT: 0x80131040) C:\Documents and Settings\Administrator\Mijn documenten\Visual Studio 2005\WebSites\RAT\Default2.aspx 5

Translation:

Error 1 cannot load the file or assembly System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of it's dependancies. The manifest of the found assembly doesn't match the assembly reference........

The error points to line 5 of Default2.aspx which is:

<%@dotnet.itags.org.RegisterAssembly="System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Namespace="System.Web.UI"TagPrefix="asp" %>

It's nice to see that 31 people (at this time) took an interest to look into my problem. I hope that this latest development can give someone a clue as to what actually is causing my problem.

Again thanks.

Clemens Linders

==============================================================================================================================

Finally I can report to you that I have solved my problem (thanks to a tip of my brother).

The error does seem to report that there are two versions of the system.web.extensions.dll. But how I only installed the Ajax asp.net 2 setup I got from the original Ajax website. But than I remembered I also installed VS Orcas Beta 1. And this installed a second version of the system.web.extensions.dll.

I saw in this forum that sometimes people said I looked into my GAC and saw. For newcomers (like myself) let me tell you that if you open c:\windows\assembly that you are actually looking in the GAC. For some people who have the same problem as I did, it is a matter to install the system.web.extensions.dll in the GAC. The way people advise how to do this on this forum is using gacutil /f system.web.extensions.dll (don't forget the design version as well). I found that first I needed to copy the gacutil (which I found after doing a search) in the seem folder as the dll and than still if I used /f I got an error but after doing gacutil /? it seemed far more obvious to do gacutil /i system.web.extenstions.dll (/i for install) which at least worked. My brother also told me that when you open the Assembly folder (or you may call it the GAC), you can add dll's to the gac by simple dragging them to the assembly folder (copy and paste doesn't work). And indeed this is a far easier way of adding dll's to the gac.

But as mentioned this didn't solve my problem. Although I could see that on my server I had the version 1.0.61025.0 installed and on my development system I had 1.0.61025.0 and 2.0.0.0 And than I realised that this 2.0.0.0 version had to come from the Orca Beta version.

I tried to cheat and also installed the 2.0.0.0 (which is 925Kb versus aprox 650Kb for the other version). But that didn't work.

I found that on the web.config file most references to the system.web.extensions.dll were made to 1.0.61025.0 but some were made to 2.0.0.0. Als the aspx file made reference to 2.0.0.0. I changed all these to 1.0.61025 but that didn't help. Suddenly the error on my server chnaged from line 5 to line 1.

When you publish the website a new dll is made by VS. and during publishing a reference is added to line 1 of the aspx file. Because I also had the 2.0.0.0 version of the system.web.extensions.dll in my GAC. A reference to this 2.0.0.0 dll is made in the dll that is created during publishing. I tried to remove this 2.0.0.0 dll by right-clicking it in the windows/assembly folder and choosing remove. But it kept saying it couldn't remove this file. It was being used. So that is when I was sure that this had to come from Orca.

Only when I removed Orcas and repaired VS 2005, my problem was gone.

I did get another problem though, my webservice suddenly sometimes doesn't give a response. I haven't debugged that yet but I found a reply on the interned of someone who also removed Orca and repaired VS 2005 and everything seemed to work accept for websites. Websites and webservices isn't the same but I guess I will remove VS 2005 and re-install it.

Despite that the golden tip didn't come from this forum I would like to thank the people who read this and at least tried.

The reason that I kept updating my problem and finally also mentioned the salution is that I hope that others will benefit.

OR BETTER: don't make the same mistake as I did and don't install a Beta version of VS on the same partition as where you have your VS that you really use

I hope that people will benefit from my mistake and what I have written here.

Goodluck

Clemens Linders


Versiegegevens: Microsoft .NET Framework Versie:2.0.50727.42; ASP.NET Versie:2.0.50727.210

Hi, Clemens Linders

We appreciates that you share the solution so that the answer can be found and used by other community members having similar questions.

Thank you very much,You are so kind:)

Best Regards

Working With HoverMenuExtender with ASP .NET Menu Control

Hi!

Now I am working with Atlas April CTP.

I am trying to get HoverMenu on ASP. Net Menu Control to edit n delete the Menus at runtime.

Can anybody Help me whether it is possible or not...

waiting for reply...

Thanks and Regards,

L V Prasad Yedla.

I have the same problem. I was looking at this though and this isexactly what i need. The problem is i cannot get it to bind to asingle line of my gridview, or my treeview.
I am assuming you will have in the link button an 'Edit' command that will be placed in your C# code.

http://atlas.asp.net/atlastoolkit/HoverMenu/HoverMenu.aspx

Has anyone done this?
any pointers/hints?

You'll need to do something similar to the demo page where you

1) Specify a static/dynamic template for the menu

2) Put the extender in there next to the item


thanks for the quick reply.

could you be more specific on what i need to do with the menu?
my menu looks similar to the sample. which properties do i need to make static/dynamic?

thanks

I assume you're using the <DataBindings> section in the menu. In that case, it just generates the default HTML. You'll need to make it do a template. Check out the documentation for the Menu control - basically it's got a <StaticItemTemplate> and a <DynamicItemTemplate> that allow you to to customize what it generates. You'll need to do that and put the extender in there.

Works in VWB 2008, but not in my website

I created a nice-wroking site in VWB 2008 express edition, but when I uploaded all the files (images, all files in bin directory, default asp page and vb page, css sheet and web.config) the site gives an unknown error:http://www.wiki-pedia.co.il/

I tried to follow the directions in that page and add <customErrors mode="Off"/> to web.config but nothing happend. What should I do?

Thanks,
Yoni

What you should try to do first of all is upload a web.config that contains ONLY this:

<!-- Web.Config Configuration File --
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

If you were able not to figure out the problem, try to contact the support at the hosting server!

HTH,
Regards


yonidebest:

I tried to follow the directions in that page and add <customErrors mode="Off"/> to web.config but nothing happend. What should I do?

Thanks,

please make sure that the hosting company supports .Net 3.5 or .Net3.0 and the Ajax extensions issues ...


Oh darn. I wonder if I can get my money back...


I noticed that I get an error when entering Microsoft's website: "Server Error in '/' Application."
for ex.http://msdn2.microsoft.com/en-us/library/k6h9cz8h(vs.71).aspx

Why is this? I have no access to most of microsoft's site.


yonidebest:

I noticed that I get an error when entering Microsoft's website: "Server Error in '/' Application."
for ex.http://msdn2.microsoft.com/en-us/library/k6h9cz8h(vs.71).aspx

Why is this? I have no access to most of microsoft's site.

you must have access to above link, it works for me.

whats i want to mention here is that you have to make sure this site is not blocked by a proxy in your network or comapny


it doesn't work. I am a private user, I've never touch my network settings. Note that I usually use IE6 (where I get the error) but I have FF too for design purposes and the microsoft site works fine there. I noticed it doesnt work in IE6 after I installed ASP 3.5 and the framework, as well as VWB 2008. Perhaps on of these programs touched my network settings?

Yoni


Well, I don't see a better solution that contacting the hostnig support and ask them to check on the server what is happening with your website. They can help you more and on the spot!!

Thanks


Well, I turned to my hosting support and they installed what ever it was I needed. It seems to be working correctly now:
http://www.wiki-pedia.co.il/

Thanks for your help.
Yoni


I am glad it works for you!

Usually, when you are sure your work is running well locally and having problems on the server, better to email the support on the spot!!

Regards

Wednesday, March 21, 2012

WYSIWYG Editor

Hello,

Is there any plan to include aWYSIWYG editor in ASP.NET AJAX control kit?

If yes, when it will be available?

I have been using most of the great controls inASP.NET AJAX control kit and I believe this would be a great control to be added.

Thanks,

Miguel

Hi,

you can monitor thewishlist at CodePlex. By the way, the WYSIWYG editor is already mentioned in the wishlist.

Xcopy deployment of ASP.NET AJAX 1.0 web site?

Is it possible to deploy a website which uses ASP.NET AJAX 1.0 without running server side installation of ASP.NET AJAX 1.0 on the host?

Dar.. in response to my own question...

YES...

Have to drop the AJAX dll's in the web app bin folder, and configure the web.config with <trust level="Full"/>

So, my NEXT question and perhaps better question for a guru than my lame one above... can it be done without adjusting the trust level?


As I understand it, no; the framework requires full trust to be able to have access to certain features (I've heard Reflection requires it, but have not confirmed). Further, be aware that if your web server limits the trust level on a website, or if they change it in the future to run websites on medium trust or low trust, then your web.config's trust assertion will fail.