Deploy An C# Website With A Linq To Sql Component?
Dec 2, 2010
I have a .NET 3.5 web application that I recently added some Linq to Sql functionality to -- a dbml file, etc. Locally, it works fine.
However, when I try to deploy it, I get a null reference exception, apparently when it's trying to call the constructor for the context object.
To add to the complexity, I use a Web Deployment Project which compiles it into a single DLL. I assumed the Linq to Sql stuff would get compiled along with everything else. However, now I'm thinking that I need to move the dbml file up along with the DLL.
I had the dbml file in the App_Code directory, so I tried recreating that directory structure on the remote server. But .NET will not let me have an App_Code directory on a precompiled application. So I just moved the dbml file into the root directory -- but I still get the error.
Here's the stack trace for the error I'm getting:
[NullReferenceException: Object reference not set to an instance of an object.]
codeCS.SarcStateDataDataContext..ctor() +28
DB_Interface.SarcStateDataDB..ctor() +26
eSARC_Basic..ctor() +56
[code]....
I don't send it a connection string or connection object, because both the local and deployed versions of the program use the same remote database. But could that be the problem? The local application has access to the connection string in the dbml file, but the deployed application doesn't?
View 3 Replies
Similar Messages:
Jun 16, 2010
I'm new @ linq and can't find anywhere where it mentions if the dbml or other files are necessary to deploy with a website.
View 2 Replies
Jul 7, 2010
Question: I created an ASP.NET web application. Now it originally was meant for deployment on a webserver.
That is working, so, so far so good. My question now is: Is it possible to deploy it as a desktop-application, too? That is to say the installer installs some kind of server, plus the web application, configures the server to run this application on a localhost URL, and then creates a link in the start menu/desktop, where it opens that url (website, the application) on localhost in a web browser?
I think it should be possible, though the server wouldn't be IIS, because this is a windows component which can't be separately installed. Is there anything like this already out there? The nonplusultra would be that it only starts the server when you click on the shortcut.
View 4 Replies
Aug 3, 2010
I want to receive mail (sender + subject is enough) on a webpage using pop3 and without the use of any component. Is this possible and if so: how?
What I eventually want is building an automatic bounce handler for my newsletter.
View 4 Replies
Sep 12, 2010
I`m using Microsoft office document imaging library (MODI) in my web application.
I`ve a page where a user uploads an image file and the server code converts this image into text form using MODI. Everything works fine when the website is running through visual studio but when i run it through local iis then i receive an exception.
my code is:
[Code]....
The code is perfectly fine because it works fine through visual studio otherwise when run through IIS i receive an exception at the last line written above saying.
Object isn`t initialized and can`t be used yet.
i didn`t catch the exception at last line because trying to figure out whats exactly wrong.
View 2 Replies
Jan 5, 2010
I've created one web application in ASP.NET - 2.0 Now, I want to deploy it in my localhost itself Is it posible to do so, if yes How it can be achive without having server myself
View 1 Replies
Oct 19, 2010
We have a .Net solution for a website, consisting of 5 projects, and there are a few(less than 10) developers working on the solution. We deploy almost on a daily basis. The question is, how to setup the SVN repo to support this scenario (the daily deploy), also mentioning that not every commited file should go to production, there is a QA check before deploying.
View 2 Replies
Mar 30, 2010
I finished My web Site on my local pc and it works goodNow I want to upload it to server i get space from mochahost.net web siteAnd i want to upload the web siteWhat Files Should i Upload ??I'm using sql server 2008 as my database system and using linq to control the database..
View 1 Replies
Apr 5, 2010
I have a web site and i want any online users chat with any other user in private mode. it is like facebook chat. is there any free third-party component to use in asp.net web site.
View 1 Replies
Jul 26, 2010
i try to used vs2010 build a mvc2 website, just as a testing. so, i include the jquery script file and some css files, it works well in the vs2010. how ever, when i deploy it to iis7/windows 2008 r2, i found all the css files ("/content/*.css") can run well, but the image files ("/img/*.gif") and script files ("/script/*.js") were absence. in fact, the website runs except the image files & script files.
View 1 Replies
Jan 20, 2011
I'm accustomed to writing desktop applications in C#.NET. Where I have a nice little solution folder which is also under version control. So at any time, on any computer I can check out whatever version of my software I want run the compiler and have a working copy of my program.
Now I'm looking into developing websites, where the files and data are a lot more dispersed. I'm using ASP.NET, but really my question is more general and could apply to any website framework.
I'm trying to understand the proper work-flow between developing my website, a version control server, and the actual live website that users will see. Obviously this can vary a lot depending on the type and scale of the website, but I'm only considering a pretty simple site. I'm just getting started with this stuff.
All the source files for the site would be stored on a subversion server, which I would check out onto my local computer. My local computer would have a local database which I would use for development of the site. Next I would publish to a test version on my hosted server, which would point to a separate test database. This test database may periodically be replaced by a copy of the live database.
If all goes well I would then publish to a beta version of the site which points to the live data. Users could then check out the beta version to provide feedback. Finally if there are still no problems the source files for the live site would be updated.
Does this make sense? Does anyone have any comments on how this could be improved? Are there any good books or online tutorials available on developing these kind of workflows?
Also the one thing that I'm really not sure about is how to manage changes to the actual schema of the database. I figure with each version I could generate a SQL script that can be use to update the Test and Live databases on the host. However, I'd also like to be able to easily setup a new database for any version of my site with out having to run every update SQL script for every version up to the desired version. Is the best solution to use an ORM like NHibernate or Subsonic so I could always generate my database schema directly from my code?
View 1 Replies
Aug 16, 2010
I have source-version of project and i need to deploy it on IIS. General project it properly deploy using VS2008, but issue is, if new revision is created then i need to point new source to deploy web-site. In this case i need to remove created virtual dir for previous version. Is this possible to toggle virtual directory between two sources. I think one solution is to change virtual directory path to new one.
View 3 Replies
Jul 15, 2010
I am trying to deploy the Bugtracker.NET tool [URL], which is a normal ASP.NET 2.0 application, into the default web site of an IIS which already has Sharepoint installed in it. The OS is Windows Server 2008 R2, IIS 7.5 and Sharepoint Services 3.0. The question is that when I execute the application, I get a NullReferenceException because HttpContext.Current.Session is null, and I think that this could be due to a problem with the configuration of the web site, as the application runs perfect in web sites with no Sharepoint installed.
I already know that Sharepoint customizes the web site with handles, modules and so on, that all applications in the web site inherit, modifying their behavior. I have already given to the ASP.NET application Full trust level, enabled Anonymous authentication and InProc session state, but I am still getting that HttpContext.Current.Session is null. Even changing the app pool from Wss3AppPool to DefaultAppPool does not succeed. Maybe someone could tell me which settings do I need to tweak in the web site in order to avoid this exception.
View 1 Replies
Jun 15, 2010
I was commissioned to write a search asp.net page for a company. Page works great, they finally ask me to deploy to the web server. I RDP out to the web server, and instead of finding a normal deployment, I see all the aspx pages along with their code-behind files. They do not pre-compile their pages.
So in an environment like this, how do I deploy my asp.net page? I can get pages to run that don't have dependencies on other things, but this particular page uses Linq. So in my web project, I have a dbml file, and it's generated pages. I have put the dbml and related files on the webserver. The page fails when it encounters the using datacontext statement.
How can I tell my page where this code is?
View 4 Replies
Jun 1, 2010
Just wondering is there any drawbacks to publishing a ASP .NET web application by copying all the files in it? (That means all the .cs, .csproj files will be included in the published folder)
So far I can think that the published folder's total size may become a little bigger (but that a negligible issue for me).
View 4 Replies
Aug 21, 2010
I am new to the web development.I have built my website in visual studio 2008 using Sql server 2008 as backend.Now I want to know the whole process of deploying the website in some web domains and as well as my database to some database domain.I didn't purchase any domain till now.I want to know about web hosting as well.
View 2 Replies
Sep 30, 2010
I need to deploy a website from the SVN to different servers all within our own network. The code is currently not complied but probably will be in the future.
First the site would need to be deployed to the development server for the developers to test.
Once the Developer signs off it would be deployed to the staging server for the testers.
Once final sign off was given it would be deployed to a server farm, two live servers.
Each server has a couple of settings in the web.config to that are different; expect the two live server of course. I would like to use templates, the way the Ruby on Rails world does, seems like an elegant solution to multiple web.config files.
I also need to create a list/report of the files that were changed and what the change was since the last deployment.
I thinking of writing a script that will do the following
1. Take args for server to deploy to, and revision
2. Export a copy of the source to a directory with svn export -r <deploy revision>
3. Delete the web.config file
4. Use ttree (a template tool [URL]) to create the correct web.config
5. Create a list of file changes with svn list -r <deploy revision>:<current server revision>
6. Stores the <current server revision> of the website for when the script is run next time
I prefer to use tools that are already available rather than re-invent the wheel. Unfortunately I don't think MSDeploy will do what I need, but I'm happy to use it, or anything else, if it will do what I need it to. Does anyone know of any tools that are up to the task or is the script my only option?
View 1 Replies
Feb 20, 2010
I need a walkthrough or steps of how to deploy ASP.NET Website on Windows Azure.
View 3 Replies
Jan 18, 2011
I had created a data driven website with back end as Mysql and i want to deploy on the client machine.
Is it really necessary to create a Web Application to deploy instead of website?
And if it does how to add the current web site to a new web application ?
How to configure the website/web application ready to deploy ?
TO deploy on the client side , including all major and minor settings including prerequisites?
View 6 Replies
Aug 3, 2010
I am trying to stop the data flow when certain conditions happen in the script component. Like if a row in the data set has an invalid date, I dont want that dataset to be inserted in the tables or go through OLEDB Destination, rather I want the entire data flow for that dataset to stop and go back to the control flow page.
I have tried mulitple solutions but nothing worked. Conditional Split ends up inserting the correct rows, but I just dont want anyting to be inserted when one row is bad, where as I do want the entire dataset to be inserted if all rows are good.
How can I fail the component when certain conditions happen int eh script component.
View 1 Replies
Aug 4, 2010
how to deploy an ASP.NET2.0 website on Windows server 2003 & IIS 6.0.
I tried to follow these steps but I get the message "Internet Explorer cannot display the webpage".
1. Create a new website in IIS with a host header.
2. Browse to the directory where the asp.net website is and setting it as home directory.
3. Stopping the website and starting it.
I am using Visual studio 2005 to develop my Asp.net website.
View 16 Replies
Jul 3, 2010
I am having problems in deploying my first project in asp.net and for about 3 days still I haven't deploy yet my first web app. First, I need to deploy my web in windows xp for demonstration purposes before deploying it in the dedicated server. Is there a best tutorial that I can follow in order for me to easily deploy my first web app? I feel so disappointed with it because, it seems that it is not easy to deploy a web app that is made of ASP.NET.
View 3 Replies
Nov 4, 2010
What are the options available to call another web applications hosted in the same server. Eg: i have a application App1 and App2 hosted on the same server.i just wanted to call App2 from App1 how would i do it.
The most important point is that I can not change the url on the address bar to call the page of the 2nd web application.
Whatever I have achieved so far is I have added a link to my 1st application which redirects to the 2nd application, but it is changing the url on the address bar, I want to redirect to the 2nd application from within the 1st application.
View 3 Replies
Dec 8, 2010
I'm trying to find the best server architecture solution to deploy monthly updates to an Asp.net external public facing website. What I'm looking for are ways to release a new version of a website with minimal impact to users. Besides deploying the standard way (ie. stop IIS, copy new website over existing website, start IIS), what are some "better" solutions for deployment out there? It would be nice if they kept their session and didn't have to see a "Website under maintenance" message during the update. My server configuration
We have 2 IIS web servers (2003) and are trying to figure out the best way to utilize them for deployments. My first thought was to update the non-active web server with the latest release. Then to gracefully point the web traffic to that server with minimal impact to users (best case, the user doesn't lose his session). How would you go about "repointing" the web traffic from server 1 to server 2? Changing firewall NAT? Changing DNS records? Some other way?? We need to be able to test the live site immediately after we release the new changes (duh). BTW, we are using nant and cruise control to automate the builds, and a custom web service to deploy the build to production. So it's all automated with the click of a button. Could a better solution be achieved using a 3rd server? If so how?
View 2 Replies
Nov 11, 2010
How to deploy Asp.net web site in IIS 6.0 my Environment is windows server 2003 64 bit and port ruining 81.
View 1 Replies