Single project with all service references for solution? - wcf

We have a Visual Studio solution that comprises multiple production and test projects. The solution uses several web services.
The way things are organized at the moment, each project that needs access to a web service has a "Service Reference" for that web service added to it. This means that there are multiple (usually only two) references to every web service: one in the production code, one in the test code.
However, we are finding a problem: when the other web-services get updated, we often forget to update ALL the service references to them (usually in the test projects that use them).
Someone suggested that we add a new project to the solution that contains ALL the service references and that NO OTHER project should have a service reference included.
Are there any "gotchas" with this proposed approach?
Is it a good idea? And why (not)?

We use the same approach as well, however there's a very inconvenient gotcha - you can't have multiple service-references from the same application.
So we ended up having to create the service-references manually using the svcutil, but other than that, we're pretty happy with the change.

Related

Add individual user accounts

I am developing a project in ASP.NET CORE, it is already in progress, and there arose the need to create the login, however how to do this with the project already in progress? How to enter as Indivual User Accounts? I've seen several tutorials, but always starting from scratch, a new project, and the project is already started. What's the best way out?
On a general note, with modern frameworks that provide generators/scaffolding I sometimes end up just running the examples and then do a recursive compare between the existing project and the new project.
I can then carefully apply the necessary patches to bring the changes into the existing project
(This is useful for a number of things, - something I use it for more frequently is to bring a forgotten project up to date and streamline it.)
In ASP.NET Core 2.1 you can scaffold out identity into existing projects. See this guide on how to do this.

How to setup a project and break it into sub-projects, how to use slick in this setup

This is a brand new project, so I can use the latest version of play.
I am using IntelliJ 13.
So I want to break the models/db/service layer because I will also have a job service (reading messages off a queue for example) that will need this server layer also.
Since slick is outside of play, how do I setup the datasource for this project, keeping in mind I will be connecting to multiple databases.
Do I need to create a custom config file for this?
web-app (play2!)
- service
service (models + dao)
models
dao
jobs (service)
I don't see any examples like this, which I find strange because I think pretty much any project would have to be setup this way in the real world (beyond simple examples).
Can someone show be sample code where things are broken down like this?
This example isn't broken into sub-projects, but it is very split up and would allow you to specify multiple databases.
https://github.com/geigerma/play-cake

RavenDb Config and DocumentStore abstraction?

I am using RavenDb across multiple projects and solutions to access three different databases that are all part of the same product. For instance, I have multiple MVC projects that fetch user info and some data out of the 'web' centric database and the 'backend' database, using '-' for the id override (but I need this only for a subset of classes in the 'web' db). And then I have another 'backend' database that is used by services (as well as the MVC projects). And finally a third temp/scratch database I use by another set of services to build the backend db. And of course, all of these are being accessed from different class libraries and even console test, seed, and integration test apps.
Managing all of these is becoming quite a nuisance. Every time I create a new console app or class library that access the db, I have to setup config and raven packages for each project, make sure indexes are built, etc.... Not to mention running update on all nuget updates, or in my case, installing a new unstable version of the server/client binaries.
Is there an easier way to manage this?
I tried to abstract the DocumentStore creation and initialization, as well as index creation into it own project and reference that. But the other projects then had to manually add newtonsoft.json (and nlog) from the package directory.
As well, I am getting the following when I try and abstract the DocumentStore into a class with a static property:
StackTrace of un-disposed document store recorded. Please make sure to dispose any document store in the tests in order to avoid race conditions in tests.
Anyone have any thoughts on handling these issues?
Thanks
I don't think that the manual addition of the references is a big issue, but you can add the actual nuget references as well.
Note that the DocumentStore not disposed error is something that only happened in the unstable (debug builds), and won't happen on release builds.

Azure webrole naming

What is a good naming conventention for web role-, worker role- (and vm role) projects in Visual Studio( 2010) ?
(edit):
And what about the deploy ? The name of the web role will affect your deployed app named in the Cloud....
I don't think it matters a lot. Number of roles in the project is usually very small. Oftentimes, the web and vm roles maybe user-visible via URL's, (blahblah.cloudapp.net). So I would name them by functionality and ease of reading and not prefix them or post-fix them with a special "worker", or "web", or "vm" keywords, as you are probably thinking.
Its entirely arbiratry(sp). And unless you're adding a degree of automated monitoring and management doesn't have any significant impact.
My personal preferrence is to name them appropriately based on the unit of work, following whatever naming convention is appropriate for your shop.
The bigger question is the management of services and subscriptions, which gets a bit more complex.
I'd suffix them with ".Web" or ".Worker". Visual Studio does something similar with Silverlight projects, if you let VS generate your Silverlight host app.

Update WCF service reference

In BizTalk 2006 R2, is there some way to regenerate the reference to a WCF service that has been created using the "Add Generated Items / Consume WCF Service" option?
I tried just re-running the wizard, but it creates new ODX, BindingInfo, etc. files, and breaks the solution, so that's not the way :-(
Searched the web, but not found any references to how to update the references, just plenty on creating from scratch
I agree with Marvin, delete the old files and generate new ones.
If you keep the old ones before you regenerate you will of course have other names on the newly created, like yourname1.odx if you choose the same name as before (yourname), and breaking the solution that way, since the type name will be different.