Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 06, 2010 11:52 AM by Berris
Sep 23, 2010 12:40 PM|LINK
I'm quite inexperienced with .NET as a whole and would like a bit of guidance and pointing in the right
I'm developing a new website however, based on what I've read, I'm also using LINQ to SQL and Custom Server
Controls. The basic infrastructure is this:
I'm using SPROCS to do all CRUD operations.
I've got 2 projects, the first contains 2 LINQtoSQL files which encapsulate all my SPROCS. I use 2 LINQtoSQL files
because I'm using 2 different connections (strings) to connect to 2 different DB's. The second contains all my
custom server controls (which uses the LINQtoSQL project to access the DB.).
I then have a website which uses both these 2 projects.
I however am being lead down the path of not using LINQtoSQL because we don't know:
1. How to successfully deploy the website with these two projects (.dll's) which use LINQtoSQL.
2. It is intended that the website (using these two projects (.dll's) will be deployed to multiple (physical) servers. What will be the ramifications of this? Will this make deployment and maintenance more difficult? How would that be gone about?
If anyone can point me in the right direction, that'd be highly appreciated.
Sep 23, 2010 01:03 PM|LINK
as long as proper .net framework deployed on server, no problems with LINQ you will have.. I don't really undrestand the second issue you describing, but if I got correctly you worried about several sites will use same DAL assembly to work with data. This
is also not a problem (moreover if different sites uses different DB intances.. in case of one intance, it depends on RDBMS.. I think that SQL2008 should handle this)).
Sep 23, 2010 02:21 PM|LINK
Thanks for your response.
I think I'm (once again) not exactly sure how to properly deploy to a server. I tried it the other day, just by:
1. copying all my local files onto the server
2. copying my local DB's onto the server and
3. changing the config file on the server to refer to itself.
This failed. I've tried googling how to properly deploy, however so far haven't found anything particularly definitive/helpful.
How would I go about deploying with the relevant .dll's? Do I just upload the .dll's to the server? Do I need to also register the .dll's on the server (using regserver32.exe)?
My second concern is that this website (and the associated .dll's) will be deployed on different servers in different countries around the world (which I'll have to maintain).
Will I have to rebuild the .dll's for each server specifically or will I be able to upload the same .dll's to each server and just change the config file to point to the appropriate machine (assuming all DB's etc... are the same)?
Similarly, if I change or add anything (new SPROCS etc...) will I only need to just upload the new .dll's (the same one) to each server or will I have to build specific ones for each server?
Will I need to register/re-register the .dll's after any changes?
Sep 28, 2010 07:34 AM|LINK
If I understand the question clearly, you just need to change the connection string for LINQ to SQL when deploying. If the LINQ to SQL is a library project, you just need to create a new connection string with the same name in current web.config to override
the one in the DLL. Then, LINQ to SQL will automatically use the new one.
Sep 29, 2010 06:56 AM|LINK
you should also check out, what micrsoft already offering for deployment:
Sep 29, 2010 08:19 AM|LINK
You will for sure need to change the connection string which have to be located on web.config file.
Also a suitable permission for that connection on the SQL server.
Mark this as an answer if you find it helpful.
Sep 29, 2010 08:43 AM|LINK
I've been doing a bit of reading about deployment. Will the X-Copy method of deployment not work for this then? That is, just copying all the local files up onto the server and reconfiguring the web.config file (obviously with all the necessary DB's as
well). Is there some special requirement for deploying the .dll's? Do I necessarily need to build a deployment project? (I have no problem doing so if that's what's needed, I just don't know if that is what is needed).
Sep 30, 2010 07:57 AM|LINK
No, the X-Copy deployment will also work for you and you have no need to have a deployment project. The only point you have to take care of is the connection string, you have to change it if needed when the project is deployed on server. Thanks.
Sep 30, 2010 08:48 AM|LINK
Many, many thanks for that guys. I will give that a whirl and if I have any problems, you'll be the first to know...
Oct 01, 2010 01:02 AM|LINK
I've X-copied my code up onto the server. The site works ok when LINQtoSQL is not being used. So for example, I have a page that uses a data set to display rows in a grid view (using, incidentally the very same connection string as does LINQtoSQL) and
this works fine. However, as soon as I try to view a page that uses LINQtoSQL I get an error. I ran it from IE on the actual server and the error I get is:
However, in light that the very same connection string (there is only one connection string in the web.config file) is used successfully by the data set to connect to the DB and display the correct data, then I'm struggling to see that there is a problem
with this connection string here. Any ideas as to what the problem could be?