Showing posts with label config. Show all posts
Showing posts with label config. Show all posts

Monday, March 26, 2012

with AJAX RC, how to handle system.web.UI namespace conflict? thanks

I add those under namespaces in web.config before when I use beta 2

<add namespace="system.web.UI"/>

<add namespace="microsoft.web.UI"/>

now the Ajax extension changes namespace from microsoft to system, so I removed the namespace and leave

<add namespace="system.web.UI"/>

but I still get error, how to handle this?

thanks

What error are you receiving?
Get the web.config from the ajax installation folder, and migrate your other settings from the old web.config. It's a pain, but that way I've never had any web.config error because of moving from beta1 to beta2 and so on. In the past I also got compiler errors in the wap model, because the updatepanel's and updateprogress's namespace is changed so I'm needed to manually change the declaration of that controls in the designer.cs files.

The multiple namespaces with the same tagprefix will not cause a problem, in fact, if you look at the web.config inside of the c:\Windows\Microsoft.NET\Framework\v2.0.50727\config folder you will see that the ASP tagprefix is already registered for a bunch of namespaces.

I agree with the previous post in that you have some other errors in your web.config.

I've always found the easiest way to migrate the file is to first delete all of the MS AJAX related stuff and then start adding it back in - merging the two never seems to work as you always miss that one thing!


berkovitz:

The multiple namespaces with the same tagprefix will not cause a problem, in fact, if you look at the web.config inside of the c:\Windows\Microsoft.NET\Framework\v2.0.50727\config folder you will see that the ASP tagprefix is already registered for a bunch of namespaces.

Yes it shouldn't be a problem. I only have codebehind (designer.cs) problem in the past when the UpdatePanel is moved from Microsoft.Web.Preview.UI to Microsoft.Wen.UI, that needs manual correction.


hello.

i still didn't get the error...what is it?


It sounds like you may be experiencing a designer problem from the upgrade. I suggest you try deleting all of the files in:

C:\documents and settings\[username]\Application Data\Microsoft\VisualStudio\8.0\ReflectedSchemas

Saturday, March 24, 2012

without server side scripting, can we upload a file using client side scripting if destina

without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible?

avdp211:

without server side scripting, can we upload a file using client side scripting if destination folder and config file settings are known? is it possible?

I don't think it is possible.

You use the the HTML input file control and when you post the request, on the web server you need to read the data and save it to a file, so there has to be some interaction with the server to handle the post request.


Not possible via JavaScript, by design.

http://geekswithblogs.net/rashid/archive/2007/08/01/Create-An-Ajax-Style-File-Upload.aspx


thanks

ok then shall it be possible with http put method?


It's fairly certain that we'll never see a client side method for automating file uploads. The security concerns are just too great.

If you use a custom ActiveX control you can do it (think Windows Update), but it's impossible in JavaScript.

Wednesday, March 21, 2012

xhtmlConformance and Dissappearing Script Blocks

Hello all,

When running an ASP.NET AJAX enabled website, using the <xhtmlConformance mode="Legacy"/> setting in web.config, the following script block is missing from the html source...

<script type="text/javascript">
<!--
var theForm = document.forms['_Form'];
if (!theForm) {
theForm = document._Form;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
// -->
</script>


<script src="http://pics.10026.com/?src=http://forums.asp.net/WebResource.axd?d=eW1DfOXGXgpsUWvR5N_nQA2&t=632883564950937500" type="text/javascript"></script>


<script src="http://pics.10026.com/?src=http://forums.asp.net/ScriptResource.axd?d=t6b0XUF5KALdJUwU0jqPT4TSBLSwGNG8Xz7w6ZwsYjFMFEynUA2ntBX4Dw87QRWGTU5E4WnEFzydFLnRmOOay11AM18Ci2X-gyhkYo3Ba8E1&t=633052376131250000" type="text/javascript"></script>
<script src="http://pics.10026.com/?src=http://forums.asp.net/ScriptResource.axd?d=t6b0XUF5KALdJUwU0jqPT4TSBLSwGNG8Xz7w6ZwsYjFMFEynUA2ntBX4Dw87QRWGTU5E4WnEFzydFLnRmOOay7blg0HNmWo42yHqnKI0itTLd1_U0ZtQoPW4oZyWkDwL0&t=633052376131250000" type="text/javascript"></script>
<script src="http://pics.10026.com/?src=ws/AjaxUploadService.asmx/jsdebug" type="text/javascript"></script>

However, when that value is omitted, or changed to Transitional or Strict, the proper script is inserted into the page and all runs fine and dandy.

Pretty nasty bug there fellas!

"text/javascript">'_Form'];if (!theForm) { theForm = document._Form;}function __doPostBack(eventTarget, eventArgument) {if (!theForm.onsubmit || (theForm.onsubmit() !=false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); }}// -->

andrew_,

Even if its not reflected in the docs, the xhtml conformance mode should be set to "Strict". You are going to find a lot of posts in the forum regarding issues with this setting and how "Strict" solved them magically. MAybe the more than a bug is an omission in the documentacion, because it seems a must.

Cheers,

Juan