MVC :: How To Share An Image Folder Between 2 Web Projects
Sep 22, 2010
I'm searching an answer to this question on the web for 2 weeks unsuccessfully.I'm sure I'm not the only one to wondering about that! I have two web projects MVC2: a FrontOffice and a BackOffice.
The user has to be able to upload some image in the BackOffice, which will be display on the FrontOffice and vice versa. How can I share an image folder between these two projects? Has the folder to be necessary in the solution or can it be somewhere else on the server? My team and I are working with TFS.
I want to create an image folder in which we can write and read from frontoffice and backoffice. But I don't want to have to do a "get latest version" everytime someone is adding an image in the folder. I would like to create a folder on the server we can access from the backoffice AND the frontoffice with reading and writing rights in real time. I'm not sure to be very clear.
View 9 Replies
Similar Messages:
Mar 29, 2011
I have created two websites ,such as [URL] and [URL]; The two websites both use SQL Sever Session Mode and they use the same database for sessionstate management.
in [URL],I have a controller as below:
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Welcome to A Site!";
Session["User"] = 123;
return View();
}
}
[URL] I have a controller as below:
public class HomeController : Controller
{
public ActionResult Index()
{
if (Session["User"] != null)
{
ViewBag.Message = "Welcome to B Site!" + Session["User"].ToString();
return View();
}
else
{
ViewBag.Message = "Welcome to B Site!" ;
return View();
}
}
}
if I access [URL] first ,then access [URL], I will get the response :Welcome to B Site!123 if I access [URL] first,then access [URL] then access [URL],I will get the response:Welcome to B Site.
View 4 Replies
Aug 3, 2010
We have several different MVC2 projects on the go and I would like to be able to share a single master page between them.
Is there an easy way to do this without recreating the same master page in each project?
View 1 Replies
Mar 24, 2011
We have a solution with multiple web projects, and there are some pages that should be present in several of them. So we'd need some sort of a shared project which contains aspx files, and which can be referenced by other web projects.
Now there are a few implementations out there:
One implementation described by ScottGu which involves building the shared project, and than copying the output aspx into the host project, and referencing the dll of the aspx. This method has the disadvantage that if the apsx gets modified it must been recopied.
Another option, based on David Ebbo's post would be to convert the aspx into ascx-es which can be referenced as custom controls, and than include those custom control aspx-es into the host project inside of some placeholder pages. (This solution seems to be the most promising) But the concerns are: can all apsx pages transformed into an ascx? I mean there's no Page.LoadComplete to give an example.
And yet another option is to use virtual directories that map into the shared webproject, as described in a Microsoft KB article. The problem again with this method is that the shared aspx-es must be in predefined directories(that is the virtual directory). If the name of virtual directory overlaps a physical directory, the virtual overrides it and no pages from the latter can be used. Is it perhaps possible to merge these two together?
View 4 Replies
Feb 10, 2010
Now, I've refactored my code to have a data layer, business layer and the main project as the view layer. Next I'd like to split this big project smaller projects based on discrete functionality. As I understand it, one way to handle a shared masterpage is to copy it into each project, that's not the worst thing, it hasn't changed in over a year and if it does it's easy enough to propagate the changes out to the other projects.
I was also reading that I could create an assembly from my master page and share it that way. My masterpage.aspx has a reference to a asp.net sitemap, Unlike the masterpage I'd like to maintain only one site map if possible.
View 2 Replies
Jun 15, 2010
I had two seperated projects that used the same database, similar methods, etc. So i've created a new solution and added those two projects.I've created an C# Class Library project and i've writed there all the methods from the other two. I've also created an edmx file for DAL layer. I've added the reference of the C# Class Library projects to others two but now i'm having an problem.When i try to connect to database i get the error message: "The connection specified wasn't founded in aplication, doesn't destinate to be used with the EntityClient or isnt't valid" (i've translated this from Portuguese, so it's 100% correct).
[code]....
View 1 Replies
Jun 22, 2010
I have 2 projects, where they both can upload attachments into a directory.
The problem is how do you get the projects to be able to access each others attachments or even save these attachments in the same folder...
At the moment my ProjectA saves uploads into its "uploads" folder... But when you are running ProjectB it doesnt have the same uploads folder (if that makes sense)
e.g.
ProjectA uploads folder: localhost:50732uploads
ProjectB uploads folder: localhost:50331uploads
I want these projects to be able to view attachments that the "other" project has uploaded.
View 2 Replies
Mar 15, 2011
I need to temporarily access the network to separate directories. When do it I have access exception. I'm from Ukraine. not sure about the accuracy of the translation. "Logon not produced: Username or password not recognized"
access from my PC to the share directory I have >> Start >> Run >> \network addres
View 1 Replies
Oct 26, 2010
How To Get The Unc Share Name Of A Given Folder (If Shared)?
View 2 Replies
Jul 29, 2010
In this asp.net web application, users can upload files to the server through a web interface. All the uploaded files are save in a server side folder. If I want to create a new win form desktop client (actually, its a WPF application) which can be used to upload files to that same server side folder as web interface does, how can I share that server side folder with that win form client?
View 2 Replies
Jun 16, 2010
I've developed a file browser that will browser a different server shared folder. In order to get this working I'm using the unc path (\ServerSharedFolder) to return the files/folders. I've also added the following to my webconfig to get around the security <identity impersonate="true" userName="domainadmin"
password="password" />
It's simply a file browser, no create or delete functions will occur. The solution works and what I want to know is that this the safest way to do this? or the best way? I did try to use a virtual directory instead of unc path but asp.net would support this.
View 1 Replies
Mar 7, 2011
I have a web application that uses Windows Authentication, not forms, and has identity impersonate = true.
From an .aspx page, the following code can create a folder on a network share successfully but fails in my .asmx page.
dirPolicyFolder.CreateDirectory(ConfigurationManager.AppSettings("PolicyApplicationsPath") & strFolderName
I have confirmed that the same user is logged in both examples, permissions on the parent folder are set correctly, and the logged user has propper right to do this.
If I change the path to a local one, the asmx page can create the folder.Why would this fail when running in the .asmx page?
View 3 Replies
Jun 17, 2010
I need to iterate through a server share and list every file within every folder and write each file name with all of its attributes into a database table.I assume that using the FileInfo class and all of it's properties (CreationTime, DirectoryName etc etc) is the best way but I have no idea of how to start.I'm starting to create a web app
View 8 Replies
Sep 29, 2010
I am stumped. i want my asp.net website to access a network share folder which is located at say, //hero/superman. I can do it manually.
I've done the following:
1. Included <identity impersonate="true" userName="IUSR_TEST" password="test" /> in my web.config.
2. Set anonymous access in IIS 5.1 with username IUSR_TEST and password: test in the account that is used for anonymous access. Checked integrated windows authentication.
3. Created a profile for IUSR_TEST in computer/management/local users and created the password: test for it. It is a member of guest.
4. Created a user account IUSR_TEST for the network share computer. gave it the same username and password.
4. On the network share computer, I've enabled access for the following people: ASPNET, NETWORK SERVICE, and IUSR_TEST.. all with full potential (for now) for the directory path in question //hero/superman which is really located on: c:herosuperman. I've given it full access.
But when I StreamReader fs = File.OpenText(Server.MapPath(@"\herosuperman est.txt"); I get the error "UnauthorizedAccess Exception". Access to the path \herosuperman est.txt is denied.
So what did I miss, what am I doing wrong. The key thing here are:
the webserver is on a domain. the network share computer is NOT on a domain, it is on it's own workgroup. This workgroup, lets just say is called "villains". So if I have to manually map the network drive to access the files, I must type: /villains/IUSR_Test and password: test to be able to map it on my webserver local computer.
View 2 Replies
Feb 9, 2010
i have a situation where i need to develop a web system where sys. admin can create a shared folder in server and set who can access the shared folder programmatically.
i've manage to find example to create a shared folder from here:[URL]
and i also manage to find example to add user and set folder Security setting from here:[URL]
My problem is how can i add user in the Sharing permission setting since it is a shared folder. Default sharing setting is set to 'everyone'. This mean anyone in my company can browse to the shared file unless i set everyone security setting. I want to remove "everyone" and add users based on the user that i've already add at Security setting.
View 7 Replies
Dec 1, 2010
I have a gridview with hyperlink button in every row. Gridview is bind with some datasource.
Just what i want to do that when user click on hyperlink on particular row hyperlink button it should download a file.
The files are going to be saved daily in a share folder.
Secondly, I don't want to give user an option to open that file, means when user clicks hyperlink a dialog box should appear with open button.
how to find particular file as per date from share folder and download.
View 40 Replies
Jun 16, 2010
I have a folder with png images that are not shared or public (the folder is outside my application folder). Now I want my users to be able to view thoose images only if they are logged in (different users, different images). All images have a name that correspond to the users id. My idea is to stream thoose images into the asp:Image control, is that possible? How do I do that? Other (better) solutions?
View 6 Replies
Aug 11, 2010
I have two web applications which need to show products' images, but how to let them share the images?
for example, I have websites with urls: [URL]
how could I upload images, store them and share with this two websites?
View 1 Replies
Jan 31, 2011
I just moved to a new PC and installed VS 2010. I copied all of my websites over from the old machine and now when I open the old websites on the new machine, they do not show up in my recent projects list on the start page. New websites that I make do show up there but the old ones do not. This is very inconvenient. Is there a way to make old projects that I open show up in the list?
This brings up another question. Is there a way to make a shortcut that will open VS2010 up with a website already loaded so that I don't have to go through the file open dialog every time?
View 3 Replies
Jul 29, 2010
I've seen some teams that start breaking into multiple projects from the beginning and others build behemoth single projects. The large project teams say that one massive project is easier to maintain than multiple smaller projects.
View 4 Replies
Nov 1, 2010
I need to create a sample project (for educational purposes) and I'm faced with the choice between Web Site Projects or Web Application Projects. This feels similar to the choice between C# and VB. My question isn't about the differences between these 2 choices, but rather which is more popular (relevant, recognizable) to the general ASP.NET community.Has anyone seen any statistics in terms of adoption/usage of these 2 different project types? What project type should I use to reach the widest audience?Update: I created a poll on this subject - http://poll.fm/2e6cy
View 4 Replies
Jun 7, 2010
I have a multi-tiered application. I would like to publish the class libraries to UI developers to let them add to their web or windows projects to add all the functionality.
I would like to restrict access so only a certain project can be referenced. The reason is so that they do not refer to the data access layer directly and start making calls that would bypass the business logic built into the business tier.
UI->>Business Logic->>Data Access
So in other words, BL and DA are deployed as compiled assemblies. BL references DA. UI will reference BL, but I would like to strictly prevent any other project from referencing DA directly.
View 1 Replies
Apr 27, 2016
I need a code to share a patients records in image and table content in e-mail among doctors group.
View 1 Replies
May 3, 2014
I want to create my own face book share link, but it's not going to take image of perticular home or not even name.Why it's behave like that?
Below is my code.
<a title="send to Facebook" href="http://www.facebook.com/sharer.php?s=s=100&p[title]=home&p[summary]=sum_my&p[url]=http%3A%2F%2Fretirementhomesworld.com.199-79-62-24.bh-plesk-web1.webhostbox.net%2Fcommunity%2Fdetails%2F99&p[images][0]=http%3A%2F%2Fretirementhomesworld.com.199-79-62-24.bh-plesk-
[code]....
View 1 Replies
Jan 5, 2011
I have some common dlls that are referenced by both a windows service application and a asp.net web application. I don't want to make separate copies of the dlls and I also don't want to put those dlls into GAC. I try to put that service application under the same root folder as the web application so that they can share the same bin folder. I am not quite sure if this will cause any problems? I did find the web application had random session timeout, but not very often. Not sure if it was caused by the shared dlls.
View 1 Replies