View Complete Post
As a single developer in a small business I'm developing a data-driven website on my local machine using VS2008 Professional (I also have 2010 Professional)
It is then synchronised with a dedicated server using Expression Web (ditto design)
I'm using SqlExpress both machines and as features are added, I want to synchronize the dedicated server schema from the local schema
VS2010 has such a feature, but it's a ____ of a price to pay for one feature - basically adding fields as I add functionality.
I'm surprised SqlServer doesn't have such a feature built in - am I missing something?
(I've trialled RedGate SqlCompare, but it can't access the remote db, and I'm reluctant to enable SqlServer Remote Connections on a machine I don't own).
I have connection strings info in web.config. I thought that if this were the case, machine.config would be ignored. But, everytime the connection string in web.con is different than the connection string in maching.con, I get error......
The connection name 'aspnetdbConnectionString' was not found in the applications configuration or the connection string is empty.Is there something I can check or change to get the app to ignore the machine.config when web.config connection string is listed.
It accesses a database using a connection string in machine.config.
On my Windows XP Pro 32bit (SP3) machine, it works correctly.
On my new Windows 7 Pro 64bit machine, it throws "object not set to an instance of an object" when it gets to the line where it's trying use the connection string.
This is the 'object' which is not set in Windows 7:
The machine.config has the same connection string set up on both machines.
A .Net 2 website transferred to the Windows 7 machine has no problem accessing the same connection string.
Does anyone know what's going on here? Many thanks.
I need to extract or get the schema from tables in my databse and what is the best way to do it. Is there any third party tool to do it??
Any idea will be appreciated..
One of my NUnit tests has to read in some values from config files. In my main application this process works perfectly well, however when I run the unit test, the code that reads in the values from the config files doesnt read anything in. Ive tried putting app.config in my unit test project (I even tried web.config) but nothing seems to work. Are there any special steps involved when reading from config files in an nunit test ?
Ive created an NUnit test project in my solution and have added 3 tests. They all fail with the same error
SetUp : System.TypeInitializationException : The type initializer for 'Systems.Utils.ConstantHelpers' threw an exception.
----> System.NullReferenceException : Object reference not set to an instance of an object.
heres the test method
public void CreateDataContext_ConnectionString_ReturnsDataCon
Im trying to create a Web Deployment Project, the built in setup and deployment is very good in Visual Studio, i need to able to add an additional step in the setup to change the connection string in the Web config file. Ive seen a lot of articles on how to do this and in particular this http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx#7162670 I am however stuck on the final part of this tutorial, im using the code Scott provided but have two errors, heres part of my code where the errors are
void ConfigureDatabase(string targetSite, string targetVDir, string connectionString)
// Retrieve "Friendly Site Name" from IIS for TargetSite
DirectoryEntry entry = new DirectoryEntry("IIS://LocalHost/" + targetSit
I have a web application that is actually installed as a component of a third party site. In some configurations, I need to remove certain connection strings and re-add them. I'm replacing this web.config section with a xml file that includes the following:
<connectionStrings> <remove name="MyOverridenConnection"/> <add connectionString="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDb;Data Source=MyServer" name="MyOverridenConnection" providerName="System.Data.SqlClient"/> </connectionStrings>
For some reason the remove tag is left out during the substitution and I end up with the following in the installed config:
<connectionStrings> <add connectionString="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDb;Data Source=MyServer" name="MyOverridenConnection" providerName="System.Data.SqlClient"/> </connectionStrings>
Is there any way to issue removes in replaced sec
Schema- first contract-first modeling of Web Services gives you the ability to model your contracts with an XML-centric mindset. This process keeps you focused on universally acceptable types and the hierarchical data structures that can be represented in XML.
Christian Weyer, Buddhike de Silva
MSDN Magazine October 2009
Vikram Dendi looks at how machine translation is poised to change the world and why it is so important to deliver information in multiple languages.
MSDN Magazine January 2009
The Microsoft .NET Framework 1.x provided minimal options for mapping classes to schemas and serializing objects to XML documents, making this sort of mapping quite a challenge. The .NET Framework 2.0 changes all this with Schema providers and the IXmlSerializable interface.
MSDN Magazine June 2006