Showing posts with label version. Show all posts
Showing posts with label version. Show all posts

Wednesday, March 28, 2012

Very Weird Problem with Cascading DropDown

After some version updates both in AJAX.NET and Control Toolkit, I found the Cascading DropDown does not work in my project. The appearance is: the DropDown is simply blank. Even the PromptText is not shown up in the page. DropDown is not populated while the web service is working fine. No error reports to me.

But at mean time, the Sample project of Cascading DropDown page works fine on the same machine.

If I copy my code into the Sample Project, it works. This means the code is correct. And web service is always OK if open asmx page and test it.

My project was created by selecting template of AJAX Enabled website, and then copy the AjaxControlToolkit.dll from Toolkit Sample project Bin folder to my project Bin folder. And then add reference to it. Very standard way.

I compared the difference of the sample project and my project, basically the reference. The only difference is that, the AjaxControlToolkit.dll in my project is versioned as "Auto Update", while in sample project it's versioned as 1.0.61121.0. BUT I DON"T KNOW HOW TO CREATE A PROJECT WITH REFERENCE OF THIS FILE TO BE VERSIONED AS 1.0.61121.0.

For your info, my code is mainly posted as following:

<!-- for aspx code: -->

<asp:DropDownList ID="DropDownList1" runat="server" Width="200px"></asp:DropDownList>
<ajaxToolkit:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="DropDownList1" Category="Carrier" PromptText="Please select a carrier" LoadingText="[Loading carriers...]" ServicePath="uscarrier.asmx" ServiceMethod="ReturnUSCarriers"></ajaxToolkit:CascadingDropDown>

// webservice code
[WebMethod]
[Microsoft.Web.Script.Services.ScriptMethod()]
public CascadingDropDownNameValue[] ReturnUSCarriers(string knownCategoryValues, string category)
{
SqlConnection cnn = new SqlConnection(ConfigurationManager.ConnectionStrings["CMSConnectionString_Prod"].ConnectionString);
SqlCommand cmd = cnn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select distinct Name, OperatorID from [CMS_Carriers] where OperatorID like '3%' and IsActive = 1";
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds, "Carriers");

List<CascadingDropDownNameValue> carriervalues = new List<CascadingDropDownNameValue>();

for (int i = 0; i < ds.Tables["Carriers"].Rows.Count; i++)
{
DataRow dr = ds.Tables["Carriers"].Rows[i];
carriervalues.Add(new CascadingDropDownNameValue((string)dr["Name"], dr["MBloxOperatorID"].ToString()));
}
return carriervalues.ToArray();
}

The ReturnUSCarriers method needs to be static. (This is covered in the ASP.NET AJAX migration docs as well ashttp://blogs.msdn.com/sburke/archive/2006/10/21/hint-components-that-use-web-services-with-asp-net-ajax-v1-0-beta.aspx.)

David:

Thanks for your reply. I set the method to be static, and it still does not work.


If this is a page method (looks like it is), then you may want to try removing the ServicePath property entirely.
my cascading dropdowns are no longer working as well. I am calling an external web service with the same method signiture as above.
also, this was after I upgraded to the RC and updated control kit.

figured it out, for some reason I was missing this in my web.config:

<addverb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"validate="false"/>


Shoot, I just realized those were needed for the Ajax to work in IE. And by me removing those lines from the web.config it just does a normal postback and not an asynchronous call. That is why it worked for me. So really nothing has changed. I am back to nothing on why the response.redirect() doesn't work. You guys mentioned that you took the code and were able to get the response.redirect() to work. I'm not sure what in my environment could be any different. I'm running this off of localhost and I do not have IIS running.

Monday, March 26, 2012

virtualEarthMap

Hi!

Can anybody tell something about the magical disappear of AtlasUIMap.js andvirtualEarthMap control in version RC1? With older verisons of Atlas (int time of Microsoft.Web.Atlas.dll, april CTP maybe) it worked fine. But the RC1 unfortunately does not know anything about it :(. Does RC1 have any wrapper for Microsoft Virtual Earth, or in RC1 we only have pure VE SDK, and AJAX gives us no support for mapping?

Thx

Yes there is not support for Virtual earth in currently in ASP.NET Ajax. But the VE SDK is pretty good and well structured so you can use it wothout the need of a wrapper.

vswebsite.interop now required?

I downloaded the latest release today, and dropped it in as a replacement for the older version of my project. When I deployed this on our production webserver, I got errors about not being able to find vswebsite.interop. I don't know what this is, but from a couple of quick searches, I would guess that it's something to do with providing designer support in Visual Studio. My question is why has this been added as a dependancy of the control toolkit, and if it is intentional, how would I go about installing this on a production webserver without installing visual studio?

From what I can see this is something to do with web project support in visual studio.

Richard

I'm having the same issue. I've tried uploading the bare bones version of an AJAXEnabledWebSite to a hosting account and I've also tried uploading to a server. Both of which gave me the same error. However when loading any other VS built website those ran fine... Please if you get anywhere with that error let me konw.

-CJ

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:Could not load file or assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 32: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>Line 33: <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>Line 34: <add assembly="VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>Line 35: </compilation>Line 36: <httpHandlers>


Source File:D:\Inetpub\wwwroot\ajaxenabledwebsite1\web.config Line:34

Assembly Load Trace: The following information can be helpful to determine why the assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210


FWIW, I found that you can just remove that line from the web.config when deploying to a production server and everything seems to be ok. Not sure why it was put in in the first place, because whether it is there or not doesn't seem to make a difference.


When I take that line of code out of the web.config file and upload this is the new error i get: any other ideas?

-CJ

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.

Exception Details:System.IO.FileNotFoundException: Could not load file or assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Source Error:

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.


Assembly Load Trace: The following information can be helpful to determine why the assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


When I take that line of code out of the web.config file and upload this is the new error i get: any other ideas?

-CJ

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.

Exception Details:System.IO.FileNotFoundException: Could not load file or assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Source Error:

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.


Assembly Load Trace: The following information can be helpful to determine why the assembly 'VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.

WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


If I remove the line AFTER I deploy to production then it works fine. The problem is, every time I publish the site it puts it back in, so you can't just remove it from your web.config and expect it to work... This is definitely an issue that needs addressing...


I get the error, too. It's a major issue and needs to be addressed ASAP.


okay so what i did that seemed to solve the issue was I found VsWebSite.Interop.dll on my machine and uploaded that into the bin folder. then I leave that line of code and it runs. what a pain tho.

Good workaound though not a good solution. We're working on this, stay tuned.


It's probably Visual Studio that's adding that line (typically whenever you do a build). The 10606 Toolkit has an new dependency on VsWebSite.Interop.dll, but that file's needed *only during development* (it's for interacting with the designer, I believe). So it's fine to go to production without that line in web.config, but I can see how it'd be annoying to have it added all the time. I've pinged Ted/Shawn since they're more familiar with the details of this than I.


I had the same problem...

I solved this doing:

1.- Open .\AjaxControlToolkit\AjaxControlToolkit.csproj

2.- Expand the References,Click on "VsWebSite.Interop" and set "Local Copy?" [Sorry, But I'm Using the Spanish VS version :$] to TRUE.

3.-Make the DLLs

(Now In my Bin\Release folder I have 2 Dlls. AjaxControlToolkit.dll and vswebsite.interop.dll [and the "cultures folders" if was in "Release"] )


After that, I Added the reference to the new AjaxControlToolkit.dll, and the Web Works fine..Surprise

EDIT: In a 2nd test, I'd need copy the vswebsite.interop.dll to the bin folder...
After this 2nd test, I saw that Before do that Steps, If I remove that line before compile the web, The line appears again after Compiled ... Now, This don't occur)

____________________________

-- Sorry For My English Mistakes... :( --

------------------- This, When I add the AjaxControlToolkit reference, The vswebsite.interop.dll is added to the Bin Folder too..


I'm having this issue as well, except removing the line from the web.config file on my server does not seem to work. I get the generic "Runtime Error" message after doing that, informing me to turn CustomErrors mode to Off, although it is already off in my web.config file. Where is the vswebsite.interop.dll file located?


This assembly isn't needed at runtime - the problem you're probably seeing is that the deploy step is sticking the reference back into the web.config.

We're working on a fix for this. In the meantime, make sure the web.config that's on the server doesn't have this reference.


its in some odd place in the VS 2005 folder in program files... just do a search for it.


According tohttp://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=10994, this issue has been closed as part of release 10615. But, I don't understand the whole codeplex thing and what this really means.

Saturday, March 24, 2012

Warning1Could not resolve this reference. Could not locate the assembly "System.Web.Extens

I just downloaded the latest version of the toolkit and tried to run the solution in vs 2005 and this is one of the many errors I'm getting while trying to run the project. Does anyone have any idea how to fix this?

Warning 1 Could not resolve this reference. Could not locate the assembly "System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. AjaxControlToolkit

Hi Mohaaron,

Please make sure that Asp.Net 2.0 Ajax Extensions V1.0 has been installed. If not , please reference tothis document. Ajax Control Toolkit is seperated for working on .NET Framework2.0 and .NET Framework 3.5. So please double check it.

I hope this help.

Best regards,

Jonathan

WCF compatible versions

Will the most recent version of the WCF ( in WinFX runtime version 3.0.3906.22 -- on XP) work with the current release of Atlas? Or, must I use the February CTP?

Thanks,

Jack

I have found that Atlasdoes notsupport the May CTP release of WCF. This is because the ServiceHostFactory class has been moved from System.ServiceModel namespace to System.ServiceModel.Activation namepsace. So the Microsoft.Web.ServiceModel is broken.

Wednesday, March 21, 2012

WCF problem with June CTP on WinFX Beta 2

The documentation states that "The WCF support in this version of "Atlas" requires Beta 2 of .NET Framework version 3.0."

Unfortunately, when I run the wcf_cs/Simple.aspx from the Atlas Documentation website (run as a filesystem) on Beta 2 (on XP SP2), I get the following stack trace:

[InvalidCastException: Unable to cast object of type 'System.Web.Compilation.BuildResultCustomString' to type 'System.Web.Util.ITypedWebObjectFactory'.] System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +161 System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) +36 System.Web.Compilation.BuildManager.GetCompiledType(String virtualPath) +81 Microsoft.Web.Services.WebServiceData.GetWebServiceData(String virtualPath, Boolean failIfNoData) +271 Microsoft.Web.Services.WebServiceData.GetWebServiceData(String virtualPath) +30 Microsoft.Web.UI.ScriptManager.BuildScriptElement(String servicePath) +399 Microsoft.Web.UI.ScriptManager.GetScriptReferences() +979 Microsoft.Web.UI.ScriptManager.RenderXmlScript(TextWriter writer) +110 Microsoft.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +663 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +96 System.Web.UI.Page.PerformPreRenderComplete() +32 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4796

Is there anyway to fix or workaround the above problem? Is there a configuration in which WCF will work with ATLAS?

Thanks, Jack

I was able to get the simple service WCF sample to work by pulling the relevant files out into a newly created Atlas enabled test website. I then quickly discovered that navigating (instead of trying to directly view or set simple.aspx as the start page in VS) to the simple service form in the Atlas Documentation website also worked. I'm not sure why -- I nested the service files in my test website and was still able to view it directly. As time permits, I'll see if I can find a cause.

At any rate, WCF appears (I've only tried the samles) to work with the June CTP of Atlas on WinFX Beta 2.