Data Sharing - .NET - Using Another App's App_data?
Feb 4, 2010
If there is a self contained web app, let's use the Screw Turn Wiki as an example, that utilizes the App_Data to store the MDF, is there any way another web app, living in the same domain, can also use that MDF?
Example IIS Setup:
http://wiki.domain.com | c:webwiki | port 80
http://www.domain.com | c:website | port 80
My WWW web app would like to pull some data from the WIKI app. Without moving the MDF to a full fledged SQL Server is there a way to do this? Also note, the WIKI app is an installed app so I don't have access to its source.
View 2 Replies
Similar Messages:
Dec 1, 2010
I see on the bottom of blog pages a sharing buttons (Twitter and Facebook), where if clicked the link behind (which is normally the blog page url) the fshare button takes the clicker to the blog site facebook page respectively.
How does one do this in asp.net 2 , does one one use the <%# %> in the url part of these share buttons, are there any examples of how this is done?
View 8 Replies
Apr 4, 2010
I want to write an .xml file using the following code into the App_Data/posts, why is it causing an error:
Stream writer = new FileStream("..''App_Data''posts''" + new Guid(post_ID.ToString()).ToString() + ".xml", FileMode.Create);
View 2 Replies
Jan 7, 2011
My Microsoft Access DB file is in APP_DATA folder. my server is Windows 2003 and I like to know how is the best way to protect this file.
so which one is safer ?
./wwwroot/App_data/Database.mdb
or
./db/Database.mdb
View 2 Replies
Jan 24, 2010
I've an XML file stored in App_Data which is only used to read some configuration on startup. When I attempt to open it within my code, I get an Access to the path ... is denied message.
I'm having trouble understanding why, and how to solve it. I guess in theory I should alter the permissions on the file (and directory), but this hasn't changed anything.
To give a bit more background:1. Its a file bundled with the project, so the setup created by VS2008 writes it to the correct place during install. I didn't think I'd need to do anything unusual post install such that the ASP.NET application would have access.
2. When I've tried publishing this locally, I've not had any problems. - This is only on a test Windows 2003 server.
3. I've ran a simple page to understand the effective user of IIS - It is NT AUTHORITYNETWORK SERVICE. I tried granting "Full Access" to this user to this file, and still it doesn't work.The code to open it is simple:
FileStream fs = new FileStream(Server.mapPath(s), FileMode.Open);
Where s is defined as '~/App_Data/myfile.xml
I've even copied and pasted the full path & filename (from the exception) and tried "dir" on it, and it is indeed present (to get around a typo for example).I've also tried running aspnet_regiis.exe /s
View 1 Replies
Oct 14, 2010
I have a web application (MainApplication) where many of the pages contain a custom Web Control that looks for some content in a cache. If it can't find any data within the cache, then it goes out to a database for the content. After retrieving the content, the Control displays the content on the page.
There is a web application (CMS) in a subdirectory within the aforementioned web application. Users use this CMS to update the content pulled in by the MainApplication.
When a user updates some content using the CMS, I need the CMS to clear the relevant portion of the cache used by the MainApplication. The problem is that, as two different web applications, they can't simply interact with the same static cache object.
The ideal solution would be to somehow share an instance of a cache object between both web applications.
Failing that, what would be the best (performance-wise) way of communicating between the two web applications? Obviously, writing/reading to a database would defeat the purpose. I was thinking about a flat file?
View 3 Replies
Feb 17, 2010
I have to different .Net applications running simultaneously. Assume both are windows / web applications.When I update some data in application A
correspondingly data in application B must be updated.
View 3 Replies
Jun 3, 2010
i want to maintain session data between two applications or domains [URL]. I have read on net about this, but many people pointing many different ways to do it, with people commenting +ve and -ve responses to all. Plus many are just providing theoretical answer, do this and that ,but no code at all. are these steps all that is required?
1) in web.config: <httpCookies domain=".[URL]"/>
2) store session data in sql DB as:(after preparing the db for storing sessions)
<sessionState mode="SQLServer" sqlConnectionString="Data Source=YourServer;
Integrated Security=True;database=MySessionDB" sqlCommandTimeout="30"
allowCustomSqlDatabase="true"/>
<machineKey decryption="AES" validation="SHA1" decryptionKey="..." validationKey="..." />
3)Am confused about this one: i want to set the domain for the session cookie like this
Response.Cookies["ASP.NET_SessionId"].Domain = ".[URL]";
But where should this code be written?
this entry: [URL]says: use System.Web.SessionState.SessionIDManager as a base class but the SaveSessionID method is not virtual so cannot be overridden. Options are: either explicitly re-implement the interface method or decorate SessionIDManager class and after calling SessionIDManager.SaveSessionID set Response.Cookies[SessionIdCookieName].Domain to our domain.
Only if the author had provided real code, step 3 would have been clear. Plus all this 3 steps enough to share session among the domains?
View 1 Replies
Nov 7, 2010
am new to web services and have a quick question. I've some data (an c# class object) that needs to be shared between two different users (of my web service) . all the methods in the web service have a parameter called "sessionkey" which can be used to know what data to share.
i need to know how/where to store this data ?
View 4 Replies
Nov 5, 2010
how do i pass data between two asp.net webservice sessions ?
this is the scenario, we've windows application and web service. our windows app calls a third party web site which requires data from our applciation. this 3rd party suggested that we create a web service that they can call from the web site.
after some reading it looks like i can use "application" object to store the data so that we store data in session with a specific session key and give it to web site and web site passes this session key in all methods it uses in webservice. is this best approach to take ?
View 8 Replies
Feb 25, 2010
we have a program that we work with with in 2 different locations, both of the program instances must share the same database.what i did is to open Web Sharing folder on our server then i added on both computers this folder to their "My network places" and direct both of application to this folder which contains the database.this is how i direct the program :
Code:
D:WNKKWnkk.exe \MyServerktest
nk2008
it all works fine but there is one problem, the data pulling is pretty slow when it shouldn't we have 100MB download / upload on our server and over 10MB dl/ul in our office.
some pointers:i added the shared web folder to one of our website directory and thats mean that the port the program is using is 80
is port 80 is slower then others?
View 10 Replies
Feb 13, 2011
I am working on a web service that return image tiles for site using Bing Maps. The problem I am having is that All these tiles are created using a single data source. When the bing maps control calls out for the imagery it calls the service multiple times to get the tiles it needs. So if the first thread to go in gets the file all the other threads will fail until the first thread is done reading in the file. Is there an easy way to share this file between all the requests? The flow for what im trying to do is as follows: recieve request open file and read in the data to a custom class - (this is the class I would like to share for all the threads) create the image based on the data return the image.
View 3 Replies
Jan 27, 2010
I have a page where I display ASP.NET charts. There are two types of charts and I felt the need to separate them to some extent which I did by using a submenu which looks like this:
Charts > Goals Charts
> Reconciliation Charts
Clicking on either of the two chart links will take you to the same Charts.aspx page, but with the query string "Goals" or "Reconciliation" respectively. On the page load of the Charts.aspx page, I receive the query string into a session variable and create the correct charts based on that value. All of this works fine.
The problem I'm experiencing occurs when I open up a new tab in IE/Firefox. Here is the series of events I'm experiencing:
- In the original tab, I will click on the "Goals Charts" hyperlink which loads the Charts.aspx page with "Goals" as the charts type session value. The other controls on the page needed to produce "Goals" charts (eg. drop down lists, etc) are displayed correctly ie. the "Goals" version. At this point, I haven't done anything in this tab except for loading the Charts.aspx page from the "Goals Charts" link.
- In the original tab, I right click the "Reconciliation Charts" link and opt to open in a new tab (I just tested and the same thing appears to be working if you opt to open in a new window as well). When the new tab loads the Charts.aspx page, it loads with the query string "Reconciliation" which it stores in the session variable. So at this point I would expect to have two different, independent tabs: the original tab on the "Goals Charts" track and the second tab on the "Reconciliation Charts" track.
- This is where the problem occurs. I would expect the original tab/window to create a "Goals" chart when I make a selection using the other controls and I would expect the second tab/window to create a "Reconciliation" chart. The problem, however, is that when I go back to the original tab/window - the one which should be a "Goals" chart and which should have "Goals" stored in the session value - when I proceed to create a chart, it's a Reconciliation chart that is created.
Somehow, even though I'm in a different tab or window and I am navigating the site seemingly independently of the other tab/window, it seems to be carrying the most recently populated value from the session variable for both tabs/windows.
View 5 Replies
Aug 8, 2010
I'm building a Data Access Layer for my asp.net application. I would like to be able to share connection between different classes in order to manage transaction, but I don't know how to do that.
Example:
I have 2 classes, Order and OrderDetail.
I will call my DAL Order class for a SQL insert of a new order.
Inside the Insert method, I want to call my OrderDetail class to insert my order's details, and I would do that with same connection and transaction.
View 1 Replies
Nov 26, 2010
We are using static hashtable in webservice for sharing common data among different users. Is it safe? Is there any better way?
View 1 Replies
Mar 26, 2010
Is there a way to create only the InsertItemTemplate in the FormView and then assign it to EditItemTemplate. Something like
Page_Load
{
FormView.EditItemTemplate = FormView.InsertItemTemplate;
}
View 4 Replies
Oct 1, 2010
If i have a server with ASP.NET 3.5 installed, where no one explicitly installed SQL Express. Can my web application still connect to an MDF file in the App_Data folder
View 1 Replies
Feb 18, 2011
I've noticed that ASP.NET automatically creates an App_Data folder for you whenever you make a new webforms application.
Since all of my data comes from a SQL Server 2005 database server, is there any reason to actually keep this folder?
View 8 Replies
Jul 13, 2010
i tried to add sql/server database file to app_data and i got this error
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
im using sqlserver 2005 and VS2008 +i tried to amke remote cpnnection and restart the services but with no use
View 2 Replies
Sep 21, 2010
I'm using VS 2008 web developer express and SQL Server 2008 express. I created a few dbs using management studio and then created an App_Data Folder in the Web Developer. However, I cannot add the DBs that i created to the App_data folder. I navigated to C:Program FilesMicrosoft SQL ServerMSSQL10.SQLEXPRESSMSSQLDATA and tried to add the DB to the App_data folder. I get the following error:
"The File cannot be added because its being used by another process.
View 1 Replies
Jan 30, 2011
Pardon if this is a very dumb question, but I was trying to migrate an existing ASP application to asp.net MVC, and followed the procedure from the music store tutorial (http://www.asp.net/mvc/tutorials/mvc-music-store-part-4), which involves adding the
database to the App_Data folder. (I had to restart my machine before it would work, since otherwise, Visual Studio thought the database was being used by another application.)
Now when I check in Windows Explorer, it looks like the database file was literally copied into the App_Data folder, and now I have two mdf files on my hard drive with the same name. What is going on there?
Will my MVC app ignore the original (real) database and use it's own private copy instead? (That would be bad.) Or is the new copy just for reference when using wizards that generate entity classes etc.? If the latter, what is the procedure when the real
database is modified, to update the application code?
View 4 Replies
Feb 1, 2010
I used aspnet_regsql -W wizard approach to create DB for membership tables. and added script as follows in web.Config
[code]....
View 1 Replies
Jul 28, 2010
I am confused as to what to do with these. I have .cs files in App_Code. I also have other files in App_Data, and Bin. Could I just create these folders, make them virtual directories and upload my files as normal? Or do I need to do something special with these folders/files? Im really stuck on this. Also, this is a "shared hosting" account.
View 5 Replies
Dec 14, 2010
I'm taking Microsoft's walk through on MVC 2 Forms Authentication - [URL]According to the walk through, when I register a user, ASP.NET creates the ASPNETDB.MDF file and it is supposed to show up in my APP_DATA folder upon refreshing in the solution explorer. The problem is, for me it is not and I want to have a look inside so I can understand it's structure.I can continue to run the project and login as the user I created, yet the ASPNETDB.MDF file is still not visible under the APP_DATA folder.
View 1 Replies
Jan 7, 2011
I am currently developing a website currently in ASP.NET. I need to give the current ready website to another collaborator to continue with the work. But how do I send the database along with the website?
If this is done, what steps do I need to follow to use the database on the new machine? Do I need to change web.config or what more?
View 3 Replies