Monday, March 26, 2012

Progres bar

Hello, I think that all of you sometimes have seen the windowsupdate site, it has a progress bar that refreshed when the catalog of patches is ready to be seen. Is this possible to do with atlas? How can I do that.

What I want to do is to show a blink label or a progess bar when I execute a stored procedures that can cke uo to 20 seconds.


Thanks

You will probably want to write a custom atlas control that does this.One way to do it, is to use a timer that does a callback to the server(using WebRequest or one of its derivatives) to check the progress. Onthe server, you should somehow keep track of the progress of yourstored procedure, which may not be that trivial. Anyway, lets say youcould figure that out, then you could return this progress when arequest from the client comes when it needs to know the currentprogress.
If there are many people who are interested in a progress bar, I couldput together a basic progress bar that checks the progress of say afile upload.

hello WilcoB,

I would love to see a progress bas in atlas...another thing that I want to ask you is...some of my website visitors are using old internet explorers, lets say IE4 ..or other thrid party browsers...is there any compatibility issue with atlas if someone is using old browsers ? if yes than what is the solution ? I dont want them to upgrade their browsers or OS...
thanks,
Danish

Here is a cheaper/easier way of doing it: http://weblogs.asp.net/rchartier/archive/2005/08/15/422635.aspx
Just stuff out an animated GIF to the page which appears to be displaying some progress. I think as long as the end-user is somewhat entertained and has some sort of visual display that something is happening they are satisfied. No real need to check back to the server and query the progress.

Go tohttp://www.wilcob.com/Wilco/Default/159/showpost.aspx to see a basic progress bar implemented using Atlas.

It seems to be a wicked progress bar you've created, but man I'm having a hard time adapting to your technique.. I'm not at all familiar with Javascript or C#. VB here..

Just to check if I'm on the right track:

So, the progress control is defined in the Scriptlibrary folder javascript file? And the parameters of these control is accesible programmatically (using VB.NET) from whatever process (running on the server)? And you're using out of the box atlas, just in your own way?

I'm a little confused. Newbie and all that. Your way seems to be the best way, so I really want it in my app.

Thanks!


How would you connect it with a modal atlas control, so the progress bar is visible in the modal dialog instead?

It does not work. I have tried to run it, got several problems. The latest I am stuck with is when running :

http://localhost:2820/AtlasProgressBarDemo/taskservice.asmx

Server Error in '/AtlasProgressBarDemo' Application.

The type System.Collections.IDictionary is not supported because it implements IDictionary.

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.NotSupportedException: The type System.Collections.IDictionary is not supported because it implements IDictionary.

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.


Stack Trace:

[NotSupportedException: The type System.Collections.IDictionary is not supported because it implements IDictionary.] System.Xml.Serialization.TypeScope.GetDefaultIndexer(Type type, String memberInfo) +269 System.Xml.Serialization.TypeScope.GetCollectionElementType(Type type, String memberInfo) +30 System.Xml.Serialization.TypeScope.ImportTypeDesc(Type type, MemberInfo memberInfo, Boolean directReference) +1491 System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError) +285 System.Xml.Serialization.TypeScope.GetTypeDesc(Type type) +36 System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers, Boolean rpc, Boolean openModel) +168 System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel) +291[InvalidOperationException: There was an error reflecting 'parameters'.] System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel) +1042 System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess access) +183 System.Web.Services.Protocols.SoapReflector.ImportMembersMapping(XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, Boolean serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use, SoapParameterStyle paramStyle, String elementName, String elementNamespace, Boolean nsIsDefault, XmlReflectionMember[] members, Boolean validate, Boolean openModel, String key, Boolean writeAccess) +765 System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +4263[InvalidOperationException: Method DataService.GetData can not be reflected.] System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +10259 System.Web.Services.Description.SoapProtocolReflector.ReflectMethod() +149 System.Web.Services.Description.ProtocolReflector.ReflectBinding(ReflectedBinding reflectedBinding) +1981 System.Web.Services.Description.ProtocolReflector.Reflect() +736 System.Web.Services.Description.ServiceDescriptionReflector.ReflectInternal(ProtocolReflector[] reflectors) +501 System.Web.Services.Description.ServiceDescriptionReflector.Reflect(Type type, String url) +165 System.Web.Services.Protocols.DocumentationServerType..ctor(Type type, String uri) +213 System.Web.Services.Protocols.DocumentationServerProtocol.Initialize() +375 System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) +70 System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +104[InvalidOperationException: Unable to handle request.] System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +303 System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +169[InvalidOperationException: Failed to handle request.] System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +345 System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +150 Microsoft.Web.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +79 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +401 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +183 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +191



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


Is this because the new version of Atlas is different?

No comments:

Post a Comment