Updating Biztalk Application - biztalk

I have a biztalk application ( with one orchestration ) which I send a select through WCF and it returns the data from one view in the SQL server.
My Question:
I'm going to have more views on the server, what is the proper way to update the application?
What i've been thinking so far:
I don't think it makes sense to have multiple applications, and multiple wcf services. So the steps I think are needed:
Generate the new schema;
Create the new orchestrations;
Deploy the application;
Republish the WCF Service;
Configure the new orchestration in the biztalk.
Thanks for all the help.

For the most part, yes, those are the steps.
Since you refer to applications, a few points just to make sure.
1. You would add the new WCF SQL Schemas, Maps and Orchestrations to the same Visual Stuido Solution, perhaps even the same Project.
2. That solution is your Deployment unit and the output of all the Projects go into the same Application in BizTalk Administrator.
3. Once Deployed, yes, configure (bind) new Orchestrations and andy new servcies.
In short, you'd have only one Visual Studio Solution and one Application in BizTalk Administrator.

Related

ASP.Net Web and WCF projects in the same solution

I am using Visual Studio 2010 and I am trying to create a solution containing an N tier architecture.
I have a project each for every tier
Common
DAL
Business //
Service // WCF
ServiceHost
Web
the projects are listed above are also called in the same order as well; so Web talks to Service tier, service tier talks to Business and business then talks to factory and factory project is responsible for talking to DB.
the issue I am having is to setup my projects in a way that before Web project is launched by pressing F5 - ServiceHost (which is just a self host console for WCF) should be started first so when Web calls for a service; it is up and running already.
Note: in PRD; Web and WCF will be hosted on different boxes altogether so this wont be an issue but for developing on Local machine - I need the above.
Interim Solution - I have excluded ServiceHost Project from the solution so it doesnt get launched with Web and I am running the ServiceHost executable externally from command line to get the Service up and running and then I am launching the Web project as normal using F5.
Can someone please tell me what do I have to do to achieve the above?
As Rajesh suggested, you set multiple projects to start in a multi-project solution. To do this, select DEBUG -> Set Startup Projects (or right-click on the solution and select Set Startup Projects... from the context menu.
This will give you a window that lists all your projects in the solution. Check the "Multiple startup projects" radio button, and set the Action column to "Start" or "Start without debugging" for each project you want to run. You can use the up and down arrows to specify the order.
If your web application requires the service to be available when it starts (i.e., the web site calls the service during it's initialization/startup), you may be better off doing as you are now (running the WCF service from the command line), otherwise this should get you where you want to be.
Attached is a screenshot (VS 2012) with a solution similar to the one you outlined above:

How to call WCF at a scheduled timings?

I have to export data from a database in the form of flat files. I already have an asp.net website which saves data into the db. I am thinking of creating a WCF webservice project as part of the website solution. This WCF webservice will have methods to export flatfiles. I am also planning to create a console app to call this webservice at scheduled times.
I have the following questions:
Once the website is hosted on IIS along with WCF, can the console app call the WCF or WCF has to be hosted separately?
How to debug the process?
is there any better way of doing it?
Once the website is hosted on IIS along with WCF, can the console app
call the WCF or WCF has to be hosted separately?
The console app can call the WCF web service. It does not have to be hosted separately.
How to debug the process?
Ideally, on your own PC. Easy way to do is to launch the WCF Webservice within one instance of Visual Studio and the Console App on another instance of VS. You can put break points on each of the projects and follow the logic
is there any better way of doing it?
There are many ways to do one thing but yours in this case looks good to me.
Your plan sounds fine to me.
If I were doing this I might create a WCF Service with One Way Operations so that the client app is not waiting for a response until the job is complete.
I might use Powershell and a scheduled task to hit the WCF service, or even use the free Pingdom service to hit the service endpoint at intervals.
To debug locally- if the WCF is it's own project make sure it's set as the startup project in VS, then apply break points, run debug and request the endpoint through the browser or Fiddler.

I need advice regarding WCF and n-tier

First off, i'm fairly new to programming, I've built a few asmx web services but I am a little lost regarding how I should set up a WCF web service. I've tried to research this over the past couple days by reading through a lot of the documentation/articles/videos on MSDN but I'm still a confused.
Since my current web services are hosted on a separate box using IIS, from what I understand I need to create a WCF Library, then reference the Library in another WCF App and then host that app in IIS and reference the WCF App from my Front End? Seems like an extra step to me...? Not to mention a pain when developing on my local box.
Any advice or a point in the right direction would be very much appreciated. Thanks!
WCF gives you the option of sharing common assemblies (i.e. so both your service and clients can use the same domain model library), but it's not a necessary step.
You can host a WCF service through ASP.NET, same as ASMX. The "WCF Service Application" project template in Visual Studio configures it this way by default - as a WCF service hosted in IIS.
For the most common scenarios, it's really no different from ASMX. You create a WCF Service application, deploy it to a web server, and add service references in client applications. The importer will automatically generate classes for you, so you don't need to reference any assembly. No extra steps.
If you haven't already, you really should have a look through Microsoft's Tutorial. You'll find the steps very similar to those for setting up an ASMX-based architecture.

.NET and webservices: how?

Im trying to make a webservice in ASP.NET and get the data in a Smart Device Application.
I have the standard HelloWorld webservice and i wanna get the data in my application, but when i try to add a web reference to my project, Visual Studio can't find any webservices running. If i start the WebService in the WebService project and copy/paste the url to the "Add WebReference" in the Application project, Visual Studio finds the Webservice and i can use the InttilSence to find the HelloWorld Method (WebServiceClass.HelloWorld()) in the WebService. But when i then run the Application project the complier gives an error saying that it can't connect to the WebService.
How do i do this? How do i access a webservice in an Application project? Every tutorial or book i have read about the subject doesn't tell anything about how the webservice should i run. In my world the webservice project should be running before i can access it from another project or am i wrong?
Consider reading Rick Strahl's Creating Web Services with .NET and Visual Studio.
From there, you'll get the basics. You can build and deploy your XML SOAP web service.
Then you'll need to have your application use that web service as a 'Web Reference'. Start by "Add Web Reference".
(source: usaepay.com)
First, you should publish the web service to some server (even your own local IIS) rather than using the Visual Studio web server.
Then in your application, point to the correct URL wherever you published it when adding the reference.
While this is a bit low-tech, couldn't you create a web requrest from the Smart Device Application to hit the webservice directly? That would be my suggestion.
An example would be using the "WebRequest" Class.
It sounds like when you try to access the Web Service from your app, the service is not running (possibly because you're only running it in the Cassini server?).
The fact that you were able to generate the Web Reference means that at some point, the service was running and was able to generate the helper classes by examining the service.
I would do as David Stratton suggests and publish it somewhere where it can run while you are developing the Smart Device app (like your local IIS).
You might also take the opportunity to wrap the service call with some error handling - maybe catch the specific exception being thrown (System.Net.WebException?)

ASP.NET web application - UI, business and database layers clarification

.
Hi,
We are building an ASP.NET application (with C#.net as language) and will be hosting on Windows Server 2003 Operating System with MS SQL Server 2008 as database.
Here I need a clarification.
The main project contains Web Application Project and few other projects such as PeriodicEmailing Service Project (A service which send emails to registered users on a periodic basis).
In case of web application project we have UI, business and database layers. In case of PeriodicEmailing Service project we need to perform some business and database functions.
So now my doubt is that … While designing PeriodicEmailing Service Project (as a best practice) do we need to implement the new business and database functions in the web application project’s business and database layers or explicit business and database layers to be designed with this PeriodicEmailing Service project itself?
Thank you for your time and your help will be greatly appreciated.
Many Thanks,
Regards,
Venkat.
.
If i understand what you're asking correctly, you could compile your business and data layer into separate assembly. This way both your website and your service can reference them without duplicating your DAL code.
Try to use existing Business Layer and Data Access Layer. If you need to add new logic, add it to your existing libraries.
That's why we use separate layers. You'll get advantage of existing code, and in future, it'll be easier to maintain your both applications.

Resources