Asp Application with the aspx files and assemblies in a shared directory in another machine

J

Javier Martinez

Hi

I have asp application in a machine with a virtual directory referring a
shared directory in another machine

When I try to load any aspx page of my portal I get the following error:


Mensaje de error del analizador: We can't load the type 'JULIAN.Global'.

Error:

Línea 1: <%@ Application Codebehind="Global.asax.cs"
Inherits="JULIAN.Global" %>


Archivo de origen: \\calamaro2\tmp\global.asax Línea: 1


Any clue?

Thanks

Javier
 
C

Cowboy \(Gregory A. Beamer\)

It looks like your application is not compiled. You can switch CodeBehind=
to Src= if you wish to deploy the global.asax.cs file. The other option is
to compile and put the compiled DLL in the bin folder.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***********************************************
Think Outside the Box!
***********************************************
 
J

Javier Martinez

Thanks but is not the case.

My application is complied, I can see the assembly en my remote bin
directory
Anyway thanks, any clue?
 
S

S.M. Altaf [MVP]

Elaborate on "load any aspx page". Do you mean you're redirecting to it?
How exactly are you referring or loading it?

Also, did you make sure to include the DLL file in the bin folder with the
ASPX?
 
J

Javier Martinez

Hi

"When I try to load any aspx page" = Put the url in my browser to tray see
the page

Yes, The dll file is in the bin folder and the folder has nt permissions set
to full to everyone count
 
J

Juan T. Llibre

re:
I have asp application in a machine with a virtual directory referring a shared
directory in another machine

Does the account that ASP.NET is running as have
read/execute rights to the shared directory in the other machine ?

It's the ASP.NET account that's connecting and which needs
access to \\calamaro2\tmp\global.asax , not your server.

Run the code snippet at :
http://www.aspnetfaq.com/default.aspx?FaqId=251&CategoryId=39

and give the user which that snippet returns,
the appropiate permissions to \\calamaro2\tmp\
 
J

Juan T. Llibre

The problem is, Javier, that ASP.NET doesn't have read
permission for \\calamaro2\tmp\global.asax as explained
in my last replies.

Sorry about sending the wrong link.

My second reply has the correct link :
http://www.aspnetfaq.com/default.aspx?FaqId=256&CategoryId=39

Assign the account returned by that snippet, read permission
to \\calamaro2\tmp\global.asax and all your pages will display.
 
J

Javier Martinez

Yes, the shared directory has full access for everyone account.

I can't run any code because any page can be loaded it
 
J

Juan T. Llibre

re:
Yes, the shared directory has full access for everyone account.

Sure it does, for the everyone account at *that* machine,
but not for any account at *your* machine.

The everyone account at the shared directory in another machine
does *not* include *any* acount in your machine.
 
J

Javier Martinez

Thanks I understand you now but How can I grant a permission for another
user in another machine?

I must declare a user with the same login and password in both machines?
 
J

Juan T. Llibre

re:
I must declare a user with the same login and password in both machines?

Yes. Also, you must set ASP.NET to run *as* that account.

In other words, you must set <identity impersonate...> in web.config.

<identity
impersonate = "true"
userName = "TheUser"
password = "ThePassword"
/>

When your machine communicates with the machine which is
hosting the shared directory, the credentials it will pass are :

userName = "TheUser"
password = "ThePassword"

Since you created an account with those same credentials
at your shared directory's machine, you will have access.
 
J

Juan T. Llibre

Did you run the script I pointed you to ?

( http://www.aspnetfaq.com/default.aspx?FaqId=256&CategoryId=39 )
If you did, what was the account name returned ?

Also, did you change the <processModel> element and set the user
name and password attributes to match your new custom account ?

Default: <!-- userName="machine" password="AutoGenerate" -->
Becomes: <!-- userName="TheUser" password="ThePassword"

i.e.,
<processModel enable="true" userName="machine" password="AutoGenerate"/>
becomes
<processModel enable="true" userName="TheUser" password="ThePassword"/>

?

Otherwise, ASP.NET keeps on running as the machine account.
 
J

Juan T. Llibre

Can't you create a virtual directory on the same machine
in which ASP.NET is running, and run that script ?
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top