MVC :: Using Images From The Servers File System Not Part Of The Application?

Jun 17, 2010

I need to use images in my ASP.NET MVC application that are not included in the application, but are saved in the file system of the server under the c/documents folder.

How can I get these images?

I have a AppHelper class that looks like this and will use to get the path

[Code]....

then in my view i will use this the get that image

[Code]....

View 11 Replies


Similar Messages:

How To Create Generic Web.config File For Different Web Servers Web Application

Jul 13, 2010

I want to create a generic web.config file for different web servers in VB.NET. So, depending on the server configuration requirements, applications can retrieve all values from that generic configuration file.

Is this possible? How would I do this?

View 5 Replies

MVC :: Display Images From File System?

Sep 17, 2010

I have class Item with properties Id, Name, ImageFileName etc.

Controller:

[Code]....

View:Create strongly typed view of Item class.

How can I display Image from file system?

[Code]....

this line gives me the error: Cannot convert lambda expression to type 'char' because it is not a delegate type

View 8 Replies

Store And Retrieve Images From File System Instead Of Database

Mar 17, 2010

I need a place to store images. My first thought was to use the database, but many seems to recommend using the filesystem. This seems to fit my case, but how do I implement it?

The filenames need to be unique, how to do that. Should I use a guid?

How to retrieve the files, should I go directly to the database using the filename, make a aspx page and passing either filename or primary key as a querystring and then read the file.

What about client side caching, is that enabled when using a page like image.aspx?id=123 ?

How do I delete the files, when the associated record is deleted?

View 1 Replies

Architecture :: Storing Images In Blob Or In The File System?

Jan 11, 2010

I would like to know which is better? Storing images in BLOB or in the File System ? I've got around 400 to 5000 images.

And at run time there are chances where I'll need to retirieve about 100 - 150 images.

View 6 Replies

Handling Images And File Attachments In A Content Management System?

Oct 8, 2010

Assumptions: Microsoft stack (ASP.NET; SQL Server).

Some content management systems handle user-generated content (images, file attachments) by storing it in the file system. Others store these items in the back end database.

Some examples of both:

[code]....

What's the best approach, and why? What are the pros and cons of keeping user files in the database? Is there another approach?

View 3 Replies

System.Net.Mail Work In One Part Of My C#.net Web App, But Not In Another?

Jun 8, 2010

I have a web application that is running on IIS within my company's domain, and is being accessed via intranet. I have this application sending out email based on some user actions. For example, its a scheduling application in part, so if a task is completed, an email is sent out notifying other users of that.

The problem is, the email works flawlessly in some cases, and not at all in others. I have a login.aspx page which sends out report emails when the page is loaded (its loaded once a day via windows task scheduler) - this always seems to work perfectly. I have an update page which is supposed to send email when text is entered and the "Update" button is clicked - this operation will fail most of the time. Both of these tasks use the same static overloaded method I wrote to send email using System.Net.Mail.

I have tried using gmail as my smtp server (instead of our internal one), and get the same results. I investigated whether having the local SMTP Service running makes any difference, and it doesn't seem to. Besides, since C# is server-side code, shouldn't it only matter whats running on the server, and not the client?Below is my code to send email.

public static void sendEmail(String[] recipients, String sender, String subject, String body, String[] attachments)
{
MailMessage message;[code]....

View 1 Replies

Caching Over Distributed Application On Servers?

Aug 22, 2010

I have a web application that will be distributed over 2 servers and the Database will be on a server other than the 2 servers. so application on each server will access database exists in another server.I am using caching in the application and when data changed the cache is cleared and the problem now how each server will feel with cache changes on the other server?

I have tried SQLCache dependency before and i have heard about Memcached, Velocity and Enterprise cache so which one will be more efficient and optimal for this case? and i have another solution to create webservice method on each application and when the cache is cleared in one application it will request the webservice method on the other application to clear cache there.

Which technique is more efficient and optimal in performance and security? and is SQLCache dependency related to SQL database only or can be applicable to other databases like Oracle?

Note: I am using load balancer to distribute requests coming for the application among the 2 server

View 1 Replies

Configuration :: Same Web Application Deployed On Three Different Servers?

Feb 13, 2011

If same web application is deployed on three different servers, which things we need to take care of and what things should be common amonges all three?

View 3 Replies

Load Balancer In Application Using Two Servers

Jan 5, 2011

We are using Two servers for our application managed by a load balancer. One of which server contains Windows server 2003 & other one contains Windows server 2008. When a request is served by windows 2003 server and its subsequent goes to the other one (2008 server). Users gets log out. Are we need same Operating systems on both systems because( when request served by 2008, and subsequent on 2003 is served without any issue).

View 1 Replies

Configuration :: Deploy Application In Multiple Servers

May 17, 2010

We have built an asp.net application according to 3 tier architecture, but Data Tier and Application logic lies on the same server. Our client needs that to be deployed in 2 different servers. Only front end in web server DAL & BLL in app server. Database is in different server. All 3 servers are at different physical locations. How can we commuicate between these servers and our applicaton tiers? is there any option in IIS so that we can deploy only back end code in another server? what is the best approach to communicate between different application tiers when they are physically apart?

View 2 Replies

Java - Important To Put Application And Database On Different Servers (for Sql - Server)?

Aug 3, 2010

I heard that for java (jboss + any DB) it's really important cuz there is going to be lot of problems, but for .net not so much, is it ?

View 4 Replies

Web Forms :: 2008 - Upload Images To Server (application / Images Folder) And Retrieve (display)

Apr 17, 2010

how to upload images to server(application/images folder) and retrive(display) from and on client PC for asp.net. its just for uplaoding logo directly to server folder and retriving from server to client. i am not getting server path on client pc for image.

View 5 Replies

Double Hop On Workgroup Servers Vs Domain Servers

Nov 16, 2010

I am trying to set up my web site on a stand alone server using Windows Server 2003 with IIS 6 which will access SQL server database (2008) on windows 2008 R2 server (also not in the domain) I am using form authentication and I have configured a custom identity account in IIS6. The local account is on both servers with same password and I have registered the account using aspnet_regiis.exe -ga The application pool in my iis6 has the custom local account set as the identity and my web.config file has the appropriate tags in the system.web element <identity impersonate="true" />

The problem is the local account does not seem to get passed to the sql server. Right now my iis settings are anonymous access (using the local acct vs isr) and no authentication specified under that - I did try Integrated and basic but it prompts for the username and password which I do not want. One article I read stated this: windows authentication does not support delegation (passing credentials from one server to another) and is limited to the one hop rule, only a primary token can be passed to a second server. windows
authentication on iis (all versions) gives the thread a secondary(impersonation) token which can not be used to access any network resouce

View 1 Replies

C# - Upload A File To Multiple Servers

Mar 6, 2010

I see a ton of questions about uploading multiple files, but none about uploading a single file to multiple servers, so here goes... I have an ASP.NET app that will be running on two load balanced servers, and I would like to allow users to upload files and have them end up on both servers. What is the cleanest way to do this? I am using IIS 6 btw. Some ideas that come to mind are:

1) Use a virtual directory that points to some shared location that both servers can access. Will there be any access issues if the application runs at Network Service? I'm assuming the application will need to run as a user account that exists on the shared location machine. How should the permissions be set for this?

2) It would be nice if I could via jQuery post the request to both of my servers, referencing them by their port numbers. Even though the servers are on the same domain, this violates the same origin policy, right? Is there another solution I'm overlooking? How do other sites do this?

View 4 Replies

Web Forms :: How To Upload A File To Two Different Servers

Aug 30, 2010

How to upload a file to two different servers

Here is Code behind:

Protected Sub btnUpload_Click(ByVal sender
As Object, ByVal e As System.EventArgs)
Handles btnUpload.Click
Dim fileExt As String
fileExt = System.IO.Path.GetExtension(FileUpload1.FileName)
If (fileExt <> ".exe") Then........

View 4 Replies

Web Forms :: Store Same File Into Multiple Servers?

Jan 30, 2010

How do i store same file into multiple servers? My scenario is explained below Administrator module resides in production server ( "cccc" domain) which is accessible only within my company. Common module resides in DMZ and can be accessed by internet users. I have written a program to upload a .xls file to both the servers. My program is in administrator module and resides in cccc domain. I could upload the file to the server in my company but i cant upload it in DMZ. Following is the code to upload to ccc domain

FileInput.PostedFile.SaveAs(Server.MapPath("..TU" & ServerFileName))
Followins is the code to upload to dmz
FileInput.PostedFile.SaveAs("http://grtr/" & "/TU/" & ServerFileName) I will get the serverfilename using file upload control

View 4 Replies

Configuration :: File Download From 3 Servers Not Working?

Sep 22, 2010

We have a problem where in the user can download files from an email. A link that will redirect to a page where the code to download the file resides. Before the download the user needs to be logged in to the system for security. The problem is that sometimes for whatever reason when the user clicks the link the download dialog box does not appear and just a blank white page. It happens only on our staging environment where we have 3 servers.. We can't reproduce this in our dev and test env. where we only have one server.

Below is the actual code.

[Code]....

View 8 Replies

Finding Difference System.web.httpcontext.current.application And System.Configuration.Appsettings?

Jan 22, 2010

Can anyone tell me the differnce between

System.web.httpcontext.current.application["tag"]

or

System.Configuration.Appsettings["tag"]

View 2 Replies

Setup Identical <machinekey /> Sections On Each Servers .config File?

Mar 2, 2010

We have a scenario using asp.net Forms Authentication in a web farm and need to setup identical <machinekey /> sections on each servers .config file.

Is it better to store the <machinekey /> section in machine.config rather then web.config? what's the advantages and disadvantages of each approach concerning security?

<machineKey validationKey="[keyhere]"
decryptionKey="[keyhere]" validation="SHA1" />

If its not secure enough, is there any way to encrypt <machinekey /> section like we encrypt our connectionsstring (with DPAPI)? (http://msdn.microsoft.com/en-us/library/ms998280.aspx)

View 1 Replies

Controls :: Convert ASPX Page To PDF File And Save It On Servers Disk?

Feb 22, 2013

i convert my webpage into pdf file in vb.net

i want to save that pdf file in a specific folder in any drive (C: or D:)

how can i give a path in the below coding

Response.Buffer =True
Response.ContentType ="application/pdf"
Response.AddHeader("content-disposition", String.Format("attachment; filename={0}.pdf", Me.psno.Text))
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Dim sw AsNew StringWriter()

[Code].......

View 1 Replies

Application Design Can Be Vary With System To System?

Jan 29, 2011

i developed one asp.net application.i published the application in iis server.then by using that url i am testing the application in my system the design is coming fine.But in other systems the design is vary.both the systems are having IE8 Browser and both are same versions.

why the designing is vary can u pls let me know.

and also button styles all are different changing in system to system.

View 1 Replies

Web Forms :: Using Datasets As Part Of Web Application Architecture?

Feb 18, 2010

i am using datasets as part of my web application architecture.

i have one dataset which has two tables which are populated from database . everything works fine but when i have change in stored procedure. i change structure of datatable in dataset file after that compilation errors start to throw up. when i check cs file of dataset it shows multiple classes with different names.

cant get into it. since im using datasets for first time. its getting frustating.

View 4 Replies

How To Create User Control As Part Of An .net Web Application

Apr 28, 2010

I have created a user control as part of an asp.net web application. This control works fine. I have then moved the control into a class library and attempted to reference it in my original application. I find that the asp controls created in the ascx for the control (texboxes and buttons) are no longer instantiated i.e. I get a null reference exception in my Page_Load event handler when I try to reference them. The only change to the page in my original application has been to change the register statement to load the control libary dll otherwise this is identical to when the conmtrol was part of the application:

[Code]....

View 1 Replies

Part Of MVC Application Data Save Not Being Applied?

Sep 13, 2010

I am writing an MVC application, and I wanted to do some extra formatting so the phone numbers all are stored the same. To accomplish this I made a simple external function to strip all non-numeric characters and return the formatted string:

public static string FormatPhone(string phone)
{
string[] temp = { "", "", "" };

[code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved