run ASP.NET from a remote share

G

Guest

Hi,
Im running IIS and all my data is stored on a network share e.g
\\10.0.0.111\domain.com\main
The problem i'm facing is that i dont know how to point my aspx.vb files to
any dlls in the bin folder, no matter where i place the bin folder.
Nothing is stored on the IIS server, everything is on the network share.
When i create an application, i can change the codebehind to
src=file.aspx.vb, this finds the vb files. But how do i tell my application
to go to the bin folder and look for the dll?
my application looks like this:

ASPX file (main.aspx)
===================================================
<%@ Page Language="vb" AutoEventWireup="false" src="main.aspx.vb"
Inherits="main"%>

ASCX control (login.ascx)
===================================================
<%@ Control Language="vb" AutoEventWireup="false" Src="login.ascx.vb"
Inherits="login"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>


ASCX.VB file
===================================================
Imports Datalib
Imports System.Web.Security
Imports Datalib.NSaccess
Public Class login

Public str As String

Private Sub button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles button1.Click
Dim da As DataClass = New DataClass
<------------------------------------------------------------------------this
is where i get an error.
Dim valid As Boolean = da.validateuser(textbox1.Text, textbox2.Text)

Session("str") = textbox1.Text
' str = Session("str")
If valid Then
Response.Redirect("display.aspx")
Else
label1.Text = "Invalid username or password"
End If
End Sub

End Class

=====================================================

The Datalib is the dll placed in the bin folder. It has code to connect to
the database.

ERROR:


Server Error in '/' Application.
--------------------------------------------------------------------------------

Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy. To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Request failed.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Is it even possible to run Dlls of a share, without making any changes on
the IIS server. Or does it have to be local to
the IIS server?


thanx
 
J

Juan T. Llibre

The /bin directory should be a subdirectory
of whichever directory the file "file.aspx.vb" is located in.

The application will find the directory automatically.
You don't have to "tell" the application to look for it.
 
J

Juan T. Llibre

My comment assumes, of course, that "file.aspx.vb"
is located in the application's root directory.
 
G

Guest

I get a security exception error when i try this.

Description: the application attempted to perform an operation not allowed
by the security policy.
 
J

Juan T. Llibre

Let's see if we can dissect this.

You say that :
When i create an application, i can change the codebehind to src=file.aspx.vb, this
finds the vb files.

So, the file file.aspx.vb *is* executed if you use "src=file.aspx.vb"

Now, when I suggest that :
You say you get a security exception.

Yet, you also say that :
The problem i'm facing is that i dont know how to point my aspx.vb files to any dlls in
the bin folder, no matter where i place the bin folder.
Nothing is stored on the IIS server, everything is on the network share.

Am I right in assuming that your virtual directory is on the network share ?

If so, creating the /bin directory in the network share should work.

In that case, you need to *remove* the "src=file.aspx.vb" from the
Page directive, so that ASP.NET can JIT-compile your codebehind.

btw, you never specified which version of the .Net Framework you're using.
I'm assuming you're using 1.1. Is that correct ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,979
Messages
2,570,185
Members
46,727
Latest member
FelicaTole

Latest Threads

Top