Using WCF Callback And Web Application To Implement Publish/subscribe Pattern?
Mar 1, 2011
I'm trying to use WCF Callback to implement publish/subscribe pattern. I would like to send the message from UserA to UserB or UserA to every clients at the moment. I got an example from here
In my app, I use asp.net as a client to connect wcf service instead and I found a problem when I subscrib to wcf service.
The wcf service does not hold any other clients object. So when I call GetAllClients(_guid), It will return only 1 client which is itself.
Here is the code in asp.net page (i put every control inside updatePanel)
[code]...
Is it possible to implement this publish/subscribe with asp.net and wcf callback? (I already tried on window app and it worked fine)If it is possible, how can I keep all clients that is connecting to WCF Service so I can use those GuId to call callback method.
I am using ASP .NET and C#, and using the code-behind-pages concept.I am trying to implement a business delegate pattern in ASP .NET to reduce coupling between the presentation and business tiers.I want to have several ASP pages send information (through asp buttons clicks) to a "business delegate" ASP page, which will in turn send the necessary information to a C# method.The problem is that each button_click event in ASP .NET is directly tied to a C# method. I am having trouble understanding how to separate the presentation and business logic because of that.
I have to implement Scheduler like outlook in my .NET application.I have already started working on it but I can't implement Recurrence Pattern. how could i achieve this functionality. how to save task with Recurrence in database? I found this RadScheduler for ASP.NET AJAX but unfortunately this controller is commercial
In the OrderController class I'm recollecting some values of a web form . Until now, I created instances of each order line (LineOrderModel class) and OrderClass inside of the Controller.
I was trying to create a OrderFacade class in order to encapsulate the different things to do when creating an order.
So in that class I created a method like this:
public void saveOrder(int idProvider,decimal? price) { // Here I create instances of OrderModel and LineOrderModel // and assign their properties }
but my problem is I don't know how to pass all the order lines captured from the web form.
I think it doesn't make sense to create and pass to that method a List with orderLines class (because the point of this is to operate with the Facade, not with the class directly)
How could I encapsulate the different lines (all with properties like numberUnits,idProduct ...) into a List of generic objects, each one with these properties?
We have an ASP.NET MVC site that uses Entity Framework abstractions with Repository and UnitOfWork patterns. What I'm wondering is how others have implemented navigation of complex object graphs with these patterns. Let me give an example from one of our controllers:
[code]....
It's a registration process and pretty much everything hangs off the POCO class Person. In this case we're caching the person through the registration process. I've now started implementing the latter part of the registration process which requires access to data deeper in the object graph. Specifically DPA data which hangs off Legal inside Country.
The code above is just mapping out the model information into a simpler format for the ViewModel. My question is do you consider this fairly deep navigation of the graph good practice or would you abstract out the retrieval of the objects further down the graph into repositories?
Does anyone have a working pattern for converting a GET-POST-GET pattern to asny?
I'm encountering the following issues:
1. You cannot mix Sync and Async action methods SubmitForm(), SubmitFormAsync(bool? confirm), SubmitFormCompleted() ... (because the resolver gets all confused ... it doesn't use the HTTP verb to decide who to target. BTW: I think that's poor design, or a bug)
2. Renaming the get method name to something else eg: SubmitFormConfirmation(), SubmitFormAsync(bool? confirm), SubmitFormCompleted() would be very awkward if it works ... because you have to doctor the <form markup to specify an action name.
3. You cannot give them all async names SubmitFormAsync(), SubmitFormAsync(bool? confirm), submitFormCompleted(), because the call just keeps malfunctioning. It sometime even behaves as if you are requesting a delete of something.
Can someone give an insight from an actually working sample.
Now that the next version of ASP.NET MVC is being prototyped and previewed (ASP.NET MVC 3 Preview 1 came out a couple of weeks ago), I wonder if we should call the attention of the Core Dev team (S Hanselman, Phil Haack and all) to this "feature."there a easy/non tacky way of associating subdomains → areas?Something like: [URL]Also, whats the best accepted design pattern in implementing PRG pattern in ASP.NET MVC? I guess it should also get some official loving in MVC 3.
want to make sure I am not assuming something foolish here, when implementing the singleton pattern in an ASP .Net web application the static variable scope is only for the current user session, right? If a second user is accessing the site it is a different memory scope...?
the best practice for a designing a simple CRUD application with some screens updating various tables (like admin pages to maintain static data for an application). the simplest way would be to drag a data grid/gridview, bind it to a dataset and use a data adapter for CRUD operations. but if this application needs to be scalable, lets say to add any extra UI/business logic in future, then is there any design pattern that can with this? should I be using an object data source control and bind it to business objects instead? or are there any better ways of doing it? should I build a complete layered application or will that be overengineering for this requirement?
I'm using Visual Studio (VS) Professional Edition 2010 and IIS 7. I'd like to publish a wpf application for download from a website. But for some reason, when I go to Build > Publish in VS, select a publishing location, select that users will install the application from a website, and then try to browse to a URL on my machine, VS gives me an error message saying:
To access local IIS Web sites, you must install the following IIS components:
IIS 6 Metabase and IIS 6 Configuration Compatibility ASP.NET
I'm not really sure why this is happening. I'm running IIS 7 on my computer, and it was my understanding that Metabase has been rendered obsolete in the latest version of IIS..
How i can publish web application without code. I mean when i upload page it's be for example: Default.aspx , Default.aspx.cs , the user can download this pages and edit on code , what i need the user can't see the code after publish such .EXE
I had first build an database and populated it with various information, set some properties related to FTS and other things.
Now, in the asp.net MVC application, I am able to add the database ServerExplorer->Connect To Database-> Data Source= MS SQL SERVER->Server name->OpAmp-pc. Now, I was unable to add the database by copying the file in app data folder.
My doubt it how can I share the website+ database with my fellow batchmate or put the whole website online.
I have published an asp.net application to a sub directory of my IIS application. I know that the web.config must exist at the root for several of the properties to work. So I have moved my web.config to the root of the application. I get the following error:
Could not load type 'ProjectName.myTypeName'.
I suspect that not having the web.config in the same directory as this aspx file is causing the issue. How do I config this so that my web.config can live in the root while the aspx file lives where I need it to?
I'm building an ASP.NET MVC application and I'm trying to deploy it on a free host (0000free) which does support ASP.NET. I tried a couple of things, but none of them worked (i.e. I only see the directory structure when I browse to my web site):
Publishing to a local folder and then copying the published files via ftp over to my host (in the public_html directory). Publishing via ftp to the root folder: ftp.mywebsite.com Publishing via ftp to the public_html folder: ftp.mywebsite.com/public_html
Usually I would just drop the html files in the public_html folder, but I'm getting the feeling that the deployment process for an MVC application is slightly different. Do I have to modify the Web.config or some other filer? How does one usually deploy an MVC application (on a free host)?
Update:I have learned that the host uses Mono and supports .NET 4.0, but I'm still not able to deploy.
I have Visual Studio 2010 and I used its Publish Feature (i.e. right click on the project name and click publish) and I tried several things:
Publish method: FTP to the root folder. Publish method: FTP to the publich_html folder. Publish method: File System to the root folder. Publish method: File System to the publich_html folder. Publish method: File System to a local directory on my computer and then FTP to root and also tried the public_html folder.
I went into the cPanel (control panel) to try and see if ASP.NET has to be added/enabled for my web site, but I didn't see anything there.I can't browse to Index.aspx nor can I redirect to it from index.html (as suggested from other posts on the host forum), right now I have a link from index.html to Index.aspx but it's not working either (see http://www.mydevarmy.com)I've also tried renaming Index.aspx to Default.aspx, but that doesn't work either.
The search utility of the forum of the host is somewhat weak, so I use google to search their forum: http://www.google.com/search?q=publish+asp.net+site%3A0000free.com%2Fforum%2F&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
I've been reading Pro ASP.NET MVC Framework and they have a chapter about publishing, but it doesn't provide any specific information with respect to the location of publishing, this is all they say (and it's not very helpful in my case):
Where Should I Put My Application?You can deploy your application to any folder on the server. When IIS first installs, it automatically creates a folder for a web site called Default Web Site at c:Inetpubwwwroot, but you shouldn't feel any obligation to put your application files there. It's very common to host applications on a different physical drive from the operating system (e.g., in e:websites example.com). It's entirely up to you, and may be influenced by concerns such as how you plan to back up the server.
Here is the error I get when I try to view my Index.aspx page:Unrecognized attribute 'targetFramework'. (/home/devarmy/public_html/Web.config line 1)
Description: HTTP 500. Error processing request.
Stack Trace:System.Configuration.ConfigurationErrorsException: Unrecognized attribute 'targetFramework'. (/home/devarmy/public_html/Web.config line 1) at System.Configuration.ConfigurationElement.DeserializeElement (System.Xml.XmlReader reader, Boolean serializeCollectionKey) [0x00000] in <filename unknown>:0
I recently developed a LINQ to SQL web application in Visual Studio 2010 on my desktop (Windows XP). It uses a connection to an SQL Server 2008 Express database on a remote server running Windows Server 2003. When I test the application (Ctrl + F5), it works well. Now I want to publish the application on the remote server, but have run into difficulties.
I packaged the application using the "Build Deployment Package" option in Visual Studio. I installed msdeploy.exe on the server and transferred the package over. I ran "application.deploy.cmd /Y" to deploy the application and got output indicating that files had been copied. The deployment created a virtual directory under the default web site in IIS 6.0 and copied the necessary application files to the C:InetpubwwwrootApplication directory. However, when I attempt to browse to the site from IIS Manager, I get a 404 error. This happens for all pages (not just the main page). So I can't get to http://localhost/Application_deploy/ and I also can't get to http://localhost/Application_deploy/Default.aspx. I mention this because when I googled the issue, I found a lot of help for people who could get to Default.aspx but not to the main page. I don't think this is my problem.
I should mention that there is another virtual directory on the default website (I think it installed with IIS 6.0) that seems to be working fine. I was also able to publish the website on my local machine using the one-click publish method and that works fine. My local machine runs IIS 5.1. At this point, I believe it's probably a configuration issue, either in IIS or in the application itself, but I haven't been able to solve it.
My operating system is Vista SP1 and vs.net 2008, I created windows application project but when I publish it , it display error
Failed to connect to 'http://localhost/project' with the following error: Unable to create the Web site 'http://localhost/project'. The Web server does not appear to have FrontPage Server Extensions installed.
I'm working in Visual Studio 2010 Professional. I have a web application based upon the standard ASP.NET Web Application, which contains the aspnetdb.mdf SQL Express database for forms based security. For testing deployment, I'm trying to use the Publish option to publish the web app to IIS 7, which exists on the same machine that I'm building the web app on. The machine is running Windows 2008 R2.
I went through the Help file to set up the deployment of the database, using the Package/Publish SQL tab in the site properties. I followed the help file to the letter, or so I thought. I go to publish to the virtual directory I set up on IIS and it gives me errors, specifically saying the following:
Web deployment task failed.(The database'|DataDirectory|aspnetdb.mdf' could not be created.)
I took this to mean the the path isn't valid for publishing to, which makes sense. So I changed the destination path to the fully qualified path (C:WebAppsApp_Dataaspnetdb.mdf) and ran it again. This time I got the following error:
Web deployment task failed.(Cannot connect to the database 'C:WebAppsAppDataaspnetdb.mdr'.)
I looked at the security for the folder and everything seems fine. Now I'm stuck.
My question is - can anyone tell me what I'm doing wrong, or supply a list of steps to follow, or give me a link to a site that has clear steps as to how this is done?
I want to write a page that shows the content of an rss feed. But I dont want to show only the current rss info but also previous. In other words I want to store every rss feed from the second I will finish building this page. The old and bad method is to refresh every 1 min or so, and compare the rss list to the db list. The rsses that doesnt showen on the db will be inserted.This method looks bad to me and I want some automatic method. What I mean is that when a new feed is posted it will send it to me (as a subscriber) and then it will inserted into the db.
How do I do it? And how do I do it behined the seance (in the global.asax or something?)?
I just made my first MVC3 app, and I thought it would be fun to upload it to my web hotell. So I did a publish locally in visual studio and then transfered the published files to them over ftp. They have support for MVC3, so there shouldn't be any problems there. But what I get when I try to go the the page I get an 403 - Forbidden: Access is denied I've tried to add the: