Showing posts with label directory. Show all posts
Showing posts with label directory. Show all posts

Saturday, March 31, 2012

the asp.net application doesnt compile it self under the /bin directory, where it is?

I want to use my custom control (.cs) in my web application. Custom control
is in the same assembly as my application. I want to know the name of the
assembly (.dll) file so i can add it's <@dotnet.itags.org.Pegister Assembly="abc.dll"> name.
But in asp.net 2.0 i can't find the assembly. It is not compiled under the
/bin folder. Where it is, or how can i give a reference to it?re:
> I want to use my custom control (.cs) in my web application.

Custom controls aren't located in *.cs files.
Classes are included in *.cs files.

Can you clarify what you are looking for ?

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Umut Tezduyar" <umut@dotnet.itags.org.tezduyar.com> wrote in message
news:uxcKX7t6FHA.2036@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
> I want to use my custom control (.cs) in my web application. Custom control is in the
> same assembly as my application. I want to know the name of the assembly (.dll) file so
> i can add it's <@dotnet.itags.org.Pegister Assembly="abc.dll"> name. But in asp.net 2.0 i can't find the
> assembly. It is not compiled under the /bin folder. Where it is, or how can i give a
> reference to it?
I mean, not the *.ascx (User controls), custom control.

Let me ask my question in this way: I can't add my custom control in a web
page because i don't know what to write in the <@dotnet.itags.org.Page Assembly=''> register
tag.

"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.com> wrote in message
news:Oo7QLKu6FHA.2036@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
> re:
>> I want to use my custom control (.cs) in my web application.
> Custom controls aren't located in *.cs files.
> Classes are included in *.cs files.
> Can you clarify what you are looking for ?
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> ASPNETFAQ.COM : http://www.aspnetfaq.com/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "Umut Tezduyar" <umut@dotnet.itags.org.tezduyar.com> wrote in message
> news:uxcKX7t6FHA.2036@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
>>
>> I want to use my custom control (.cs) in my web application. Custom
>> control is in the same assembly as my application. I want to know the
>> name of the assembly (.dll) file so i can add it's <@dotnet.itags.org.Pegister
>> Assembly="abc.dll"> name. But in asp.net 2.0 i can't find the assembly.
>> It is not compiled under the /bin folder. Where it is, or how can i give
>> a reference to it?
OK...

For that, check out :
http://support.microsoft.com/defaul...kb;en-us;321749

The proper tag is :
<%@dotnet.itags.org. Register TagPrefix="Custom" Namespace="CustomControlNamespace" Assembly= "CustomControl" %
Custom is an alias that you associate with a namespace.
CustomControlNamespace is a namespace in which classes of an assembly are enclosed.
CustomControl is the name of the assembly file without an extension (.dll).


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Umut Tezduyar" <umut@dotnet.itags.org.tezduyar.com> wrote in message news:uI%23L45u6FHA.1000@dotnet.itags.org.tk2msftngp13.phx.gbl...
>I mean, not the *.ascx (User controls), custom control.
>
> Let me ask my question in this way: I can't add my custom control in a web
> page because i don't know what to write in the <@dotnet.itags.org.Page Assembly=''> register
> tag.
>
>
> "Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.com> wrote in message
> news:Oo7QLKu6FHA.2036@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
>> re:
>>> I want to use my custom control (.cs) in my web application.
>>
>> Custom controls aren't located in *.cs files.
>> Classes are included in *.cs files.
>>
>> Can you clarify what you are looking for ?

>> "Umut Tezduyar" <umut@dotnet.itags.org.tezduyar.com> wrote in message
>> news:uxcKX7t6FHA.2036@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
>>>
>>> I want to use my custom control (.cs) in my web application. Custom
>>> control is in the same assembly as my application. I want to know the
>>> name of the assembly (.dll) file so i can add it's <@dotnet.itags.org.Pegister
>>> Assembly="abc.dll"> name. But in asp.net 2.0 i can't find the assembly.
>>> It is not compiled under the /bin folder. Where it is, or how can i give
>>> a reference to it?
On Wed, 16 Nov 2005 10:52:05 -0800, "Umut Tezduyar"
<umut@dotnet.itags.org.tezduyar.com> wrote:

>I want to use my custom control (.cs) in my web application. Custom control
>is in the same assembly as my application.

Is this 2.0? (I assume so based on your previous questions). Your
custom control must be in App_Code, correct?

Something like this:

namespace OTC
{
public class MyCustomControl : WebControl
{
protected override void Render(HtmlTextWriter writer)
{
writer.Write("This is my custom control");
base.Render(writer);
}
}
}

>I want to know the name of the
>assembly (.dll) file so i can add it's <@dotnet.itags.org.Pegister Assembly="abc.dll"> name.
>But in asp.net 2.0 i can't find the assembly. It is not compiled under the
>/bin folder. Where it is, or how can i give a reference to it?

ASP.NET builds App_Code as a separate assembly, and the runtime will
recognize "App_Code" as an assembly name in a reference directive.

<%@dotnet.itags.org. Register Assembly="App_Code" TagPrefix="otc" Namespace="OTC" %
...

<otc:MyCustomControl runat="Server" id="boo" /
--
Scott
http://www.OdeToCode.com/blogs/scott/

the asp.net application doesn't compile it self under the /bin directory, where it is

I want to use my custom control (.cs) in my web application. Custom control
is in the same assembly as my application. I want to know the name of the
assembly (.dll) file so i can add it's <@dotnet.itags.org.Pegister Assembly="abc.dll"> name.
But in asp.net 2.0 i can't find the assembly. It is not compiled under the
/bin folder. Where it is, or how can i give a reference to it?re:
> I want to use my custom control (.cs) in my web application.
Custom controls aren't located in *.cs files.
Classes are included in *.cs files.
Can you clarify what you are looking for ?
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Umut Tezduyar" <umut@dotnet.itags.org.tezduyar.com> wrote in message
news:uxcKX7t6FHA.2036@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
> I want to use my custom control (.cs) in my web application. Custom contro
l is in the
> same assembly as my application. I want to know the name of the assembly (
.dll) file so
> i can add it's <@dotnet.itags.org.Pegister Assembly="abc.dll"> name. But in asp.net 2.0 i c
an't find the
> assembly. It is not compiled under the /bin folder. Where it is, or how ca
n i give a
> reference to it?
I mean, not the *.ascx (User controls), custom control.
Let me ask my question in this way: I can't add my custom control in a web
page because i don't know what to write in the <@dotnet.itags.org.Page Assembly=''> register
tag.
"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.com> wrote in message
news:Oo7QLKu6FHA.2036@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
> re:
> Custom controls aren't located in *.cs files.
> Classes are included in *.cs files.
> Can you clarify what you are looking for ?
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> ASPNETFAQ.COM : http://www.aspnetfaq.com/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "Umut Tezduyar" <umut@dotnet.itags.org.tezduyar.com> wrote in message
> news:uxcKX7t6FHA.2036@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
>
OK...
For that, check out :
http://support.microsoft.com/defaul...kb;en-us;321749
The proper tag is :
<%@dotnet.itags.org. Register TagPrefix="Custom" Namespace="CustomControlNamespace" Assembly=
"CustomControl" %>
Custom is an alias that you associate with a namespace.
CustomControlNamespace is a namespace in which classes of an assembly are en
closed.
CustomControl is the name of the assembly file without an extension (.dll).
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"Umut Tezduyar" <umut@dotnet.itags.org.tezduyar.com> wrote in message news:uI%23L45u6FHA.1000@dotnet.itags.org.tk2msftngp13.p
hx.gbl...
>I mean, not the *.ascx (User controls), custom control.
>
> Let me ask my question in this way: I can't add my custom control in a web
> page because i don't know what to write in the <@dotnet.itags.org.Page Assembly=''> registe
r
> tag.
>
>
> "Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.com> wrote in message
> news:Oo7QLKu6FHA.2036@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
On Wed, 16 Nov 2005 10:52:05 -0800, "Umut Tezduyar"
<umut@dotnet.itags.org.tezduyar.com> wrote:

>I want to use my custom control (.cs) in my web application. Custom control
>is in the same assembly as my application.
>
Is this 2.0? (I assume so based on your previous questions). Your
custom control must be in App_Code, correct?
Something like this:
namespace OTC
{
public class MyCustomControl : WebControl
{
protected override void Render(HtmlTextWriter writer)
{
writer.Write("This is my custom control");
base.Render(writer);
}
}
}

>I want to know the name of the
>assembly (.dll) file so i can add it's <@dotnet.itags.org.Pegister Assembly="abc.dll"> name.
>But in asp.net 2.0 i can't find the assembly. It is not compiled under the
>/bin folder. Where it is, or how can i give a reference to it?
>
ASP.NET builds App_Code as a separate assembly, and the runtime will
recognize "App_Code" as an assembly name in a reference directive.
<%@dotnet.itags.org. Register Assembly="App_Code" TagPrefix="otc" Namespace="OTC" %>
...
<otc:MyCustomControl runat="Server" id="boo" />
Scott
http://www.OdeToCode.com/blogs/scott/

Saturday, March 24, 2012

the directory is not allowed because the application is precompiled

Hi,

have only precompiled version of application as original files have been
lost. Trying to alter application in Visual Web Developer but error message
reads

"the directory is not allowed because the application is precompiled"

Can anyone help, thanks in advance.

Simon Garehave you tried creating a new project and importing the old files? That
probably won't work but might be worth trying. If i remember correctly
the precompiled site gets rid of the codebehinds and compiles
everything into the dll's.

Simon Gare wrote:

Quote:

Originally Posted by

Hi,
>
have only precompiled version of application as original files have been
lost. Trying to alter application in Visual Web Developer but error message
reads
>
"the directory is not allowed because the application is precompiled"
>
Can anyone help, thanks in advance.
>
Simon Gare


"Simon Gare" <sg@.simongare.comwrote in message
news:%23j3iWszqGHA.4192@.TK2MSFTNGP04.phx.gbl...
if you have an App_Code directory, delete it, because all of the content are
already compiled in the dll's.

Quote:

Originally Posted by

Hi,
>
have only precompiled version of application as original files have been
lost. Trying to alter application in Visual Web Developer but error
message
reads
>
"the directory is not allowed because the application is precompiled"
>
Can anyone help, thanks in advance.
>
Simon Gare
>
>

The directory /App_Code is not allowed because the application is precompiled

I'm using VS.NET 2005 Beta 2. I have a helper C# class I wrote that I placed
in my /App_Code directory. Everything runs fine locally. However when I
use the "Copy Web" function to upload the site to the production server, I
get the following error when trying to run the page on production:
"System.Web.HttpException: The directory '/App_Code' is not allowed
because the application is precompiled."
Anyone know this works fine locally but not on development? How can I
resolve this?
Also on a related note I read a lot about a new "\code" directory in ASP.NET
2.0. Am I correct to assume that at some point they changed this from \code
to \App_Code and these are the same thing?
SteveHi, Steve.
re:
> Am I correct to assume that at some point they changed this from \code to
\App_Code and
> these are the same thing?
You're correct. In Beta 1 it was called /code.
In Beta 2, it was changed to /App_Code.
See http://msdn.microsoft.com/asp.net/w...eta2update.aspx
for a complete list of special directories.
re:
> "System.Web.HttpException: The directory '/App_Code' is not allowed becau
se the
> application is precompiled."
> Anyone know this works fine locally but not on development? How can I resolve thi
s?
You don't need to resolve it.
Because you're precompiling, everything that would go in the App_Code
directory is already compiled and doesn't need to be uploaded.
If you want to upload your source files into the
App_Code directory, don't precompile your application.
Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================
"Steve Franks" <please@.postreplyhere.com> wrote in message
news:dfKdnTtsD5yXYLneRVn-jQ@.comcast.com...
> I'm using VS.NET 2005 Beta 2. I have a helper C# class I wrote that I plac
ed in my
> /App_Code directory. Everything runs fine locally. However when I use th
e "Copy Web"
> function to upload the site to the production server, I get the following
error when
> trying to run the page on production:
> "System.Web.HttpException: The directory '/App_Code' is not allowed becau
se the
> application is precompiled."
> Anyone know this works fine locally but not on development? How can I res
olve this?
> Also on a related note I read a lot about a new "\code" directory in ASP.N
ET 2.0. Am I
> correct to assume that at some point they changed this from \code to \App_
Code and these
> are the same thing?
> Steve
>
>
> Because you're precompiling, everything that would go in the App_Code
> directory is already compiled and doesn't need to be uploaded.
> If you want to upload your source files into the
> App_Code directory, don't precompile your application.
>
I am not purposely precompiling my application. How can I prevent it from
precompiling?
Locally I just use VS.NET 2005 b2 to do the development and press F5 to run
it. Sometimes I press F6 to get a sanity check on whether I've screwed any
code up.
For production, I want the flexibility to be able to edit source on the
production server to make an update on the fly, so the precompiled approach
is not of interest.
My main goal is to just be able to easily synchronize the work I do at home
on the production server, and then get to work and easily update my local
dev copy of the web app to reflect the changes I've made at home by syncing
with the production server. Then I'll make changes at work, and when I get
home, I'll want to sync my home machine up with what's now on the production
server, and so forth. Currently I'm (trying) to use the Copy Web function
for this. Is that appropriate and/or is there a better way?
Thanks,
Steve
Juan,
Any ideas about what I posted below? Looking forward to your response. Than
you so much.
Steve,
"Steve Franks" <please@.postreplyhere.com> wrote in message
news:H_qdnYfD0ILDNrjeRVn-hQ@.comcast.com...
> I am not purposely precompiling my application. How can I prevent it from
> precompiling?
> Locally I just use VS.NET 2005 b2 to do the development and press F5 to
> run it. Sometimes I press F6 to get a sanity check on whether I've
> screwed any code up.
> For production, I want the flexibility to be able to edit source on the
> production server to make an update on the fly, so the precompiled
> approach is not of interest.
> My main goal is to just be able to easily synchronize the work I do at
> home on the production server, and then get to work and easily update my
> local dev copy of the web app to reflect the changes I've made at home by
> syncing with the production server. Then I'll make changes at work, and
> when I get home, I'll want to sync my home machine up with what's now on
> the production server, and so forth. Currently I'm (trying) to use the
> Copy Web function for this. Is that appropriate and/or is there a better
> way?
> Thanks,
> Steve
>
I would check your web project's properties under MSBuild.
-Brock
DevelopMentor
http://staff.develop.com/ballen

> I am not purposely precompiling my application. How can I prevent it
> from precompiling?
> Locally I just use VS.NET 2005 b2 to do the development and press F5
> to run it. Sometimes I press F6 to get a sanity check on whether I've
> screwed any code up.
> For production, I want the flexibility to be able to edit source on
> the production server to make an update on the fly, so the precompiled
> approach is not of interest.
> My main goal is to just be able to easily synchronize the work I do at
> home on the production server, and then get to work and easily update
> my local dev copy of the web app to reflect the changes I've made at
> home by syncing with the production server. Then I'll make changes at
> work, and when I get home, I'll want to sync my home machine up with
> what's now on the production server, and so forth. Currently I'm
> (trying) to use the Copy Web function for this. Is that appropriate
> and/or is there a better way?
> Thanks,
> Steve
>
Well, there seems to be some sort of a conflict or design issue here with
this restriction.
I decided I'd just delete my App_Code directory from the remote site. I
figured this would be OK since its tellin gme the application is
precompiled. Yet then when I go to run a page it complains "The name
'myclass' does not exist in the current context". So if everything was
precompiled and no app_code directory is needed then what's the problem
here?
My preference is to precompile locally as I test and run my app, and then
when I publish to the remote server I want to publish all the files. I
can't seem to work around this. Any ideas?
Steve
"Brock Allen" <ballen@.NOSPAMdevelop.com> wrote in message
news:b8743b112290a8c7868466d649ee@.msnews
.microsoft.com...
>I would check your web project's properties under MSBuild.
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
re:
> My preference is to precompile locally as I test and run my app
I thought you had said you did *not* precompile.
There's a difference between "precompile" and "compile".
Which one are you doing ?
Have you tried to FTP your files instead of "publishing" them ?
Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================
"Steve Franks" <please@.postreplyhere.com> wrote in message
news:gqqdnfBdIfGOFbrenZ2dnUVZ_s2dnZ2d@.co
mcast.com...
> Well, there seems to be some sort of a conflict or design issue here with
this
> restriction.
> I decided I'd just delete my App_Code directory from the remote site. I f
igured this
> would be OK since its tellin gme the application is precompiled. Yet then
when I go to
> run a page it complains "The name 'myclass' does not exist in the current
context". So
> if everything was precompiled and no app_code directory is needed then wha
t's the
> problem here?
> My preference is to precompile locally as I test and run my app, and then
when I publish
> to the remote server I want to publish all the files. I can't seem to wor
k around this.
> Any ideas?
> Steve
> "Brock Allen" <ballen@.NOSPAMdevelop.com> wrote in message
> news:b8743b112290a8c7868466d649ee@.msnews
.microsoft.com...
Sorry about the confusion. Let me explain specifically what I'm trying to
do.
Locally I'm using whatever the default settings are, as it relates to
precompiling. When I look at the property pages of my ASP.NET web
application, and click on the Build section, the revelant sections say
"Before running startup page: Build Web Site". And "Build solution action"
section has the check box checked for "Build web site as part of solution".
That is how I like to run things because I prefer to know about any mishaps
I've made coding-wise before the page runs.
Now over to production... I like the Copy Web function because it seems like
a convenient way from within VS.NET 2005 Beta 2 to easily have it sync the
production site with changes as I make them in development.
However recently I added a App_Code folder with a few utility classes I've
created. Now when I do the Copy Web the production site complains that the
App_Code folder is not allowed.
So my questions specifically are:
1) Is there a way where I can still use Copy Web in this scenario?
2) If not, how do I tell my local machine to not precompile and clear itself
from any precompiled files, so that when I do a copy web the remote site is
not in a precompiled mote? In other words, I assume my local machine has
the precompiled files that are being copied with Copy Web. So I do these
get deleted, and how do I set things set up locally so its no longer
prcompiled, so that my production server will be happy once I do a complete
Copy Web to try and straighten things out?
3) If I have to resort to a FTP copy, files with what extension should get
copied specifically? Or perhaps its easier toi look at it the other way -
which file extensions need to be deleted from the production server so it
does not see the web pages there as being "precompiled"?
Thanks so much. I'm looking forward to your answer as I have been stuck on
this for a few days. I really appreciate the help.
Steve
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:OvKJFZOuFHA.2072@.TK2MSFTNGP14.phx.gbl...
> re:
> I thought you had said you did *not* precompile.
> There's a difference between "precompile" and "compile".
> Which one are you doing ?
> Have you tried to FTP your files instead of "publishing" them ?
>
> Juan T. Llibre
> ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> ==========================
> "Steve Franks" <please@.postreplyhere.com> wrote in message
> news:gqqdnfBdIfGOFbrenZ2dnUVZ_s2dnZ2d@.co
mcast.com...
>
>
Hi, Steve.
What this sounds like is that, at some point, the "Publish Web Site"
tool was used instead of the "Copy Web" tool, and that the
"Allow this precompiled site to be updatable" option was not selected.
See : http://msdn2.microsoft.com/en-us/library/1y1404zt
for a step-by-step guide to using the "Publish Web Site" tool.
You can change the "Allow this site...to be updatable" option.
You might also want to take a look at the "Copying a website" walkthrough:
http://msdn2.microsoft.com/en-us/library/xay0wxbf
and at : http://msdn2.microsoft.com/en-us/library/1cc82atw
"Copying Web Sites with the Copy Web Site Tool"
You might be missing a key step in the process,
and reviewing those walkthroughs might point it out to you.
Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================
"Steve Franks" <please@.postreplyhere.com> wrote in message
news:OeednTMpv_Zaj7XenZ2dnUVZ_s2dnZ2d@.co
mcast.com...
> Sorry about the confusion. Let me explain specifically what I'm trying to
do.
> Locally I'm using whatever the default settings are, as it relates to prec
ompiling.
> When I look at the property pages of my ASP.NET web application, and click
on the Build
> section, the revelant sections say "Before running startup page: Build Web
Site". And
> "Build solution action" section has the check box checked for "Build web s
ite as part of
> solution".
> That is how I like to run things because I prefer to know about any mishap
s I've made
> coding-wise before the page runs.
> Now over to production... I like the Copy Web function because it seems li
ke a
> convenient way from within VS.NET 2005 Beta 2 to easily have it sync the p
roduction site
> with changes as I make them in development.
> However recently I added a App_Code folder with a few utility classes I've
created. Now
> when I do the Copy Web the production site complains that the App_Code fol
der is not
> allowed.
> So my questions specifically are:
> 1) Is there a way where I can still use Copy Web in this scenario?
> 2) If not, how do I tell my local machine to not precompile and clear itse
lf from any
> precompiled files, so that when I do a copy web the remote site is not in
a precompiled
> mote? In other words, I assume my local machine has the precompiled files
that are
> being copied with Copy Web. So I do these get deleted, and how do I set t
hings set up
> locally so its no longer prcompiled, so that my production server will be
happy once I
> do a complete Copy Web to try and straighten things out?
> 3) If I have to resort to a FTP copy, files with what extension should get
copied
> specifically? Or perhaps its easier toi look at it the other way - which
file
> extensions need to be deleted from the production server so it does not se
e the web
> pages there as being "precompiled"?
> Thanks so much. I'm looking forward to your answer as I have been stuck o
n this for a
> few days. I really appreciate the help.
> Steve
> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
> news:OvKJFZOuFHA.2072@.TK2MSFTNGP14.phx.gbl...
>
Thanks. I thnk you hit the nail on the head in that at one point a long
time ago I did use the Publish Web Site tool and probably did not check that
option.
It looks like I've resolved it by deleting the entire remote site and then
using Copy Web over again.
Steve
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:%235MIaCTuFHA.3188@.TK2MSFTNGP14.phx.gbl...
> Hi, Steve.
> What this sounds like is that, at some point, the "Publish Web Site"
> tool was used instead of the "Copy Web" tool, and that the
> "Allow this precompiled site to be updatable" option was not selected.
> See : http://msdn2.microsoft.com/en-us/library/1y1404zt
> for a step-by-step guide to using the "Publish Web Site" tool.
> You can change the "Allow this site...to be updatable" option.
> You might also want to take a look at the "Copying a website" walkthrough:
> http://msdn2.microsoft.com/en-us/library/xay0wxbf
> and at : http://msdn2.microsoft.com/en-us/library/1cc82atw
> "Copying Web Sites with the Copy Web Site Tool"
> You might be missing a key step in the process,
> and reviewing those walkthroughs might point it out to you.
>
>
> Juan T. Llibre
> ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> ==========================
> "Steve Franks" <please@.postreplyhere.com> wrote in message
> news:OeednTMpv_Zaj7XenZ2dnUVZ_s2dnZ2d@.co
mcast.com...
>
>

The directory /App_Code is not allowed because the application is precompiled

I'm using VS.NET 2005 Beta 2. I have a helper C# class I wrote that I placed
in my /App_Code directory. Everything runs fine locally. However when I
use the "Copy Web" function to upload the site to the production server, I
get the following error when trying to run the page on production:
"System.Web.HttpException: The directory '/App_Code' is not allowed
because the application is precompiled."

Anyone know this works fine locally but not on development? How can I
resolve this?

Also on a related note I read a lot about a new "\code" directory in ASP.NET
2.0. Am I correct to assume that at some point they changed this from \code
to \App_Code and these are the same thing?

SteveHi, Steve.

re:
> Am I correct to assume that at some point they changed this from \code to \App_Code and
> these are the same thing?

You're correct. In Beta 1 it was called /code.
In Beta 2, it was changed to /App_Code.

See http://msdn.microsoft.com/asp.net/w...eta2update.aspx
for a complete list of special directories.

re:
> "System.Web.HttpException: The directory '/App_Code' is not allowed because the
> application is precompiled."
> Anyone know this works fine locally but not on development? How can I resolve this?

You don't need to resolve it.

Because you're precompiling, everything that would go in the App_Code
directory is already compiled and doesn't need to be uploaded.

If you want to upload your source files into the
App_Code directory, don't precompile your application.

Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================

"Steve Franks" <please@.postreplyhere.com> wrote in message
news:dfKdnTtsD5yXYLneRVn-jQ@.comcast.com...
> I'm using VS.NET 2005 Beta 2. I have a helper C# class I wrote that I placed in my
> /App_Code directory. Everything runs fine locally. However when I use the "Copy Web"
> function to upload the site to the production server, I get the following error when
> trying to run the page on production:
> "System.Web.HttpException: The directory '/App_Code' is not allowed because the
> application is precompiled."
> Anyone know this works fine locally but not on development? How can I resolve this?
> Also on a related note I read a lot about a new "\code" directory in ASP.NET 2.0. Am I
> correct to assume that at some point they changed this from \code to \App_Code and these
> are the same thing?
> Steve
> Because you're precompiling, everything that would go in the App_Code
> directory is already compiled and doesn't need to be uploaded.
> If you want to upload your source files into the
> App_Code directory, don't precompile your application.

I am not purposely precompiling my application. How can I prevent it from
precompiling?

Locally I just use VS.NET 2005 b2 to do the development and press F5 to run
it. Sometimes I press F6 to get a sanity check on whether I've screwed any
code up.

For production, I want the flexibility to be able to edit source on the
production server to make an update on the fly, so the precompiled approach
is not of interest.

My main goal is to just be able to easily synchronize the work I do at home
on the production server, and then get to work and easily update my local
dev copy of the web app to reflect the changes I've made at home by syncing
with the production server. Then I'll make changes at work, and when I get
home, I'll want to sync my home machine up with what's now on the production
server, and so forth. Currently I'm (trying) to use the Copy Web function
for this. Is that appropriate and/or is there a better way?

Thanks,

Steve
Juan,

Any ideas about what I posted below? Looking forward to your response. Than
you so much.

Steve,

"Steve Franks" <please@.postreplyhere.com> wrote in message
news:H_qdnYfD0ILDNrjeRVn-hQ@.comcast.com...
>> Because you're precompiling, everything that would go in the App_Code
>> directory is already compiled and doesn't need to be uploaded.
>>
>> If you want to upload your source files into the
>> App_Code directory, don't precompile your application.
>>
> I am not purposely precompiling my application. How can I prevent it from
> precompiling?
> Locally I just use VS.NET 2005 b2 to do the development and press F5 to
> run it. Sometimes I press F6 to get a sanity check on whether I've
> screwed any code up.
> For production, I want the flexibility to be able to edit source on the
> production server to make an update on the fly, so the precompiled
> approach is not of interest.
> My main goal is to just be able to easily synchronize the work I do at
> home on the production server, and then get to work and easily update my
> local dev copy of the web app to reflect the changes I've made at home by
> syncing with the production server. Then I'll make changes at work, and
> when I get home, I'll want to sync my home machine up with what's now on
> the production server, and so forth. Currently I'm (trying) to use the
> Copy Web function for this. Is that appropriate and/or is there a better
> way?
> Thanks,
> Steve
I would check your web project's properties under MSBuild.

-Brock
DevelopMentor
http://staff.develop.com/ballen

>> Because you're precompiling, everything that would go in the App_Code
>> directory is already compiled and doesn't need to be uploaded.
>>
>> If you want to upload your source files into the
>> App_Code directory, don't precompile your application.
> I am not purposely precompiling my application. How can I prevent it
> from precompiling?
> Locally I just use VS.NET 2005 b2 to do the development and press F5
> to run it. Sometimes I press F6 to get a sanity check on whether I've
> screwed any code up.
> For production, I want the flexibility to be able to edit source on
> the production server to make an update on the fly, so the precompiled
> approach is not of interest.
> My main goal is to just be able to easily synchronize the work I do at
> home on the production server, and then get to work and easily update
> my local dev copy of the web app to reflect the changes I've made at
> home by syncing with the production server. Then I'll make changes at
> work, and when I get home, I'll want to sync my home machine up with
> what's now on the production server, and so forth. Currently I'm
> (trying) to use the Copy Web function for this. Is that appropriate
> and/or is there a better way?
> Thanks,
> Steve
Well, there seems to be some sort of a conflict or design issue here with
this restriction.

I decided I'd just delete my App_Code directory from the remote site. I
figured this would be OK since its tellin gme the application is
precompiled. Yet then when I go to run a page it complains "The name
'myclass' does not exist in the current context". So if everything was
precompiled and no app_code directory is needed then what's the problem
here?

My preference is to precompile locally as I test and run my app, and then
when I publish to the remote server I want to publish all the files. I
can't seem to work around this. Any ideas?

Steve

"Brock Allen" <ballen@.NOSPAMdevelop.com> wrote in message
news:b8743b112290a8c7868466d649ee@.msnews.microsoft .com...
>I would check your web project's properties under MSBuild.
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>>> Because you're precompiling, everything that would go in the App_Code
>>> directory is already compiled and doesn't need to be uploaded.
>>>
>>> If you want to upload your source files into the
>>> App_Code directory, don't precompile your application.
>> I am not purposely precompiling my application. How can I prevent it
>> from precompiling?
>>
>> Locally I just use VS.NET 2005 b2 to do the development and press F5
>> to run it. Sometimes I press F6 to get a sanity check on whether I've
>> screwed any code up.
>>
>> For production, I want the flexibility to be able to edit source on
>> the production server to make an update on the fly, so the precompiled
>> approach is not of interest.
>>
>> My main goal is to just be able to easily synchronize the work I do at
>> home on the production server, and then get to work and easily update
>> my local dev copy of the web app to reflect the changes I've made at
>> home by syncing with the production server. Then I'll make changes at
>> work, and when I get home, I'll want to sync my home machine up with
>> what's now on the production server, and so forth. Currently I'm
>> (trying) to use the Copy Web function for this. Is that appropriate
>> and/or is there a better way?
>>
>> Thanks,
>>
>> Steve
>>
re:
> My preference is to precompile locally as I test and run my app

I thought you had said you did *not* precompile.
There's a difference between "precompile" and "compile".

Which one are you doing ?

Have you tried to FTP your files instead of "publishing" them ?

Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================

"Steve Franks" <please@.postreplyhere.com> wrote in message
news:gqqdnfBdIfGOFbrenZ2dnUVZ_s2dnZ2d@.comcast.com. ..
> Well, there seems to be some sort of a conflict or design issue here with this
> restriction.
> I decided I'd just delete my App_Code directory from the remote site. I figured this
> would be OK since its tellin gme the application is precompiled. Yet then when I go to
> run a page it complains "The name 'myclass' does not exist in the current context". So
> if everything was precompiled and no app_code directory is needed then what's the
> problem here?
> My preference is to precompile locally as I test and run my app, and then when I publish
> to the remote server I want to publish all the files. I can't seem to work around this.
> Any ideas?
> Steve

> "Brock Allen" <ballen@.NOSPAMdevelop.com> wrote in message
> news:b8743b112290a8c7868466d649ee@.msnews.microsoft .com...
>>I would check your web project's properties under MSBuild.
>>
>> -Brock
>> DevelopMentor
>> http://staff.develop.com/ballen
>>
>>>> Because you're precompiling, everything that would go in the App_Code
>>>> directory is already compiled and doesn't need to be uploaded.
>>>>
>>>> If you want to upload your source files into the
>>>> App_Code directory, don't precompile your application.
>>> I am not purposely precompiling my application. How can I prevent it
>>> from precompiling?
>>>
>>> Locally I just use VS.NET 2005 b2 to do the development and press F5
>>> to run it. Sometimes I press F6 to get a sanity check on whether I've
>>> screwed any code up.
>>>
>>> For production, I want the flexibility to be able to edit source on
>>> the production server to make an update on the fly, so the precompiled
>>> approach is not of interest.
>>>
>>> My main goal is to just be able to easily synchronize the work I do at
>>> home on the production server, and then get to work and easily update
>>> my local dev copy of the web app to reflect the changes I've made at
>>> home by syncing with the production server. Then I'll make changes at
>>> work, and when I get home, I'll want to sync my home machine up with
>>> what's now on the production server, and so forth. Currently I'm
>>> (trying) to use the Copy Web function for this. Is that appropriate
>>> and/or is there a better way?
>>>
>>> Thanks,
>>>
>>> Steve
Sorry about the confusion. Let me explain specifically what I'm trying to
do.

Locally I'm using whatever the default settings are, as it relates to
precompiling. When I look at the property pages of my ASP.NET web
application, and click on the Build section, the revelant sections say
"Before running startup page: Build Web Site". And "Build solution action"
section has the check box checked for "Build web site as part of solution".

That is how I like to run things because I prefer to know about any mishaps
I've made coding-wise before the page runs.

Now over to production... I like the Copy Web function because it seems like
a convenient way from within VS.NET 2005 Beta 2 to easily have it sync the
production site with changes as I make them in development.

However recently I added a App_Code folder with a few utility classes I've
created. Now when I do the Copy Web the production site complains that the
App_Code folder is not allowed.

So my questions specifically are:

1) Is there a way where I can still use Copy Web in this scenario?

2) If not, how do I tell my local machine to not precompile and clear itself
from any precompiled files, so that when I do a copy web the remote site is
not in a precompiled mote? In other words, I assume my local machine has
the precompiled files that are being copied with Copy Web. So I do these
get deleted, and how do I set things set up locally so its no longer
prcompiled, so that my production server will be happy once I do a complete
Copy Web to try and straighten things out?

3) If I have to resort to a FTP copy, files with what extension should get
copied specifically? Or perhaps its easier toi look at it the other way -
which file extensions need to be deleted from the production server so it
does not see the web pages there as being "precompiled"?

Thanks so much. I'm looking forward to your answer as I have been stuck on
this for a few days. I really appreciate the help.

Steve

"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:OvKJFZOuFHA.2072@.TK2MSFTNGP14.phx.gbl...
> re:
>> My preference is to precompile locally as I test and run my app
> I thought you had said you did *not* precompile.
> There's a difference between "precompile" and "compile".
> Which one are you doing ?
> Have you tried to FTP your files instead of "publishing" them ?
>
> Juan T. Llibre
> ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> ==========================
> "Steve Franks" <please@.postreplyhere.com> wrote in message
> news:gqqdnfBdIfGOFbrenZ2dnUVZ_s2dnZ2d@.comcast.com. ..
>> Well, there seems to be some sort of a conflict or design issue here with
>> this restriction.
>>
>> I decided I'd just delete my App_Code directory from the remote site. I
>> figured this would be OK since its tellin gme the application is
>> precompiled. Yet then when I go to run a page it complains "The name
>> 'myclass' does not exist in the current context". So if everything was
>> precompiled and no app_code directory is needed then what's the problem
>> here?
>>
>> My preference is to precompile locally as I test and run my app, and then
>> when I publish to the remote server I want to publish all the files. I
>> can't seem to work around this. Any ideas?
>>
>> Steve
>> "Brock Allen" <ballen@.NOSPAMdevelop.com> wrote in message
>> news:b8743b112290a8c7868466d649ee@.msnews.microsoft .com...
>>>I would check your web project's properties under MSBuild.
>>>
>>> -Brock
>>> DevelopMentor
>>> http://staff.develop.com/ballen
>>>
>>>>> Because you're precompiling, everything that would go in the App_Code
>>>>> directory is already compiled and doesn't need to be uploaded.
>>>>>
>>>>> If you want to upload your source files into the
>>>>> App_Code directory, don't precompile your application.
>>>> I am not purposely precompiling my application. How can I prevent it
>>>> from precompiling?
>>>>
>>>> Locally I just use VS.NET 2005 b2 to do the development and press F5
>>>> to run it. Sometimes I press F6 to get a sanity check on whether I've
>>>> screwed any code up.
>>>>
>>>> For production, I want the flexibility to be able to edit source on
>>>> the production server to make an update on the fly, so the precompiled
>>>> approach is not of interest.
>>>>
>>>> My main goal is to just be able to easily synchronize the work I do at
>>>> home on the production server, and then get to work and easily update
>>>> my local dev copy of the web app to reflect the changes I've made at
>>>> home by syncing with the production server. Then I'll make changes at
>>>> work, and when I get home, I'll want to sync my home machine up with
>>>> what's now on the production server, and so forth. Currently I'm
>>>> (trying) to use the Copy Web function for this. Is that appropriate
>>>> and/or is there a better way?
>>>>
>>>> Thanks,
>>>>
>>>> Steve
Hi, Steve.

What this sounds like is that, at some point, the "Publish Web Site"
tool was used instead of the "Copy Web" tool, and that the
"Allow this precompiled site to be updatable" option was not selected.

See : http://msdn2.microsoft.com/en-us/library/1y1404zt
for a step-by-step guide to using the "Publish Web Site" tool.

You can change the "Allow this site...to be updatable" option.

You might also want to take a look at the "Copying a website" walkthrough:
http://msdn2.microsoft.com/en-us/library/xay0wxbf

and at : http://msdn2.microsoft.com/en-us/library/1cc82atw
"Copying Web Sites with the Copy Web Site Tool"

You might be missing a key step in the process,
and reviewing those walkthroughs might point it out to you.

Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================

"Steve Franks" <please@.postreplyhere.com> wrote in message
news:OeednTMpv_Zaj7XenZ2dnUVZ_s2dnZ2d@.comcast.com. ..
> Sorry about the confusion. Let me explain specifically what I'm trying to do.
> Locally I'm using whatever the default settings are, as it relates to precompiling.
> When I look at the property pages of my ASP.NET web application, and click on the Build
> section, the revelant sections say "Before running startup page: Build Web Site". And
> "Build solution action" section has the check box checked for "Build web site as part of
> solution".
> That is how I like to run things because I prefer to know about any mishaps I've made
> coding-wise before the page runs.
> Now over to production... I like the Copy Web function because it seems like a
> convenient way from within VS.NET 2005 Beta 2 to easily have it sync the production site
> with changes as I make them in development.
> However recently I added a App_Code folder with a few utility classes I've created. Now
> when I do the Copy Web the production site complains that the App_Code folder is not
> allowed.
> So my questions specifically are:
> 1) Is there a way where I can still use Copy Web in this scenario?
> 2) If not, how do I tell my local machine to not precompile and clear itself from any
> precompiled files, so that when I do a copy web the remote site is not in a precompiled
> mote? In other words, I assume my local machine has the precompiled files that are
> being copied with Copy Web. So I do these get deleted, and how do I set things set up
> locally so its no longer prcompiled, so that my production server will be happy once I
> do a complete Copy Web to try and straighten things out?
> 3) If I have to resort to a FTP copy, files with what extension should get copied
> specifically? Or perhaps its easier toi look at it the other way - which file
> extensions need to be deleted from the production server so it does not see the web
> pages there as being "precompiled"?
> Thanks so much. I'm looking forward to your answer as I have been stuck on this for a
> few days. I really appreciate the help.
> Steve
> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
> news:OvKJFZOuFHA.2072@.TK2MSFTNGP14.phx.gbl...
>> re:
>>> My preference is to precompile locally as I test and run my app
>>
>> I thought you had said you did *not* precompile.
>> There's a difference between "precompile" and "compile".
>>
>> Which one are you doing ?
>>
>> Have you tried to FTP your files instead of "publishing" them ?
>>
>>
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> ASP.NET FAQ : http://asp.net.do/faq/
>> ==========================
>>
>> "Steve Franks" <please@.postreplyhere.com> wrote in message
>> news:gqqdnfBdIfGOFbrenZ2dnUVZ_s2dnZ2d@.comcast.com. ..
>>> Well, there seems to be some sort of a conflict or design issue here with this
>>> restriction.
>>>
>>> I decided I'd just delete my App_Code directory from the remote site. I figured this
>>> would be OK since its tellin gme the application is precompiled. Yet then when I go
>>> to run a page it complains "The name 'myclass' does not exist in the current context".
>>> So if everything was precompiled and no app_code directory is needed then what's the
>>> problem here?
>>>
>>> My preference is to precompile locally as I test and run my app, and then when I
>>> publish to the remote server I want to publish all the files. I can't seem to work
>>> around this. Any ideas?
>>>
>>> Steve
>>
>>> "Brock Allen" <ballen@.NOSPAMdevelop.com> wrote in message
>>> news:b8743b112290a8c7868466d649ee@.msnews.microsoft .com...
>>>>I would check your web project's properties under MSBuild.
>>>>
>>>> -Brock
>>>> DevelopMentor
>>>> http://staff.develop.com/ballen
>>>>
>>>>>> Because you're precompiling, everything that would go in the App_Code
>>>>>> directory is already compiled and doesn't need to be uploaded.
>>>>>>
>>>>>> If you want to upload your source files into the
>>>>>> App_Code directory, don't precompile your application.
>>>>> I am not purposely precompiling my application. How can I prevent it
>>>>> from precompiling?
>>>>>
>>>>> Locally I just use VS.NET 2005 b2 to do the development and press F5
>>>>> to run it. Sometimes I press F6 to get a sanity check on whether I've
>>>>> screwed any code up.
>>>>>
>>>>> For production, I want the flexibility to be able to edit source on
>>>>> the production server to make an update on the fly, so the precompiled
>>>>> approach is not of interest.
>>>>>
>>>>> My main goal is to just be able to easily synchronize the work I do at
>>>>> home on the production server, and then get to work and easily update
>>>>> my local dev copy of the web app to reflect the changes I've made at
>>>>> home by syncing with the production server. Then I'll make changes at
>>>>> work, and when I get home, I'll want to sync my home machine up with
>>>>> what's now on the production server, and so forth. Currently I'm
>>>>> (trying) to use the Copy Web function for this. Is that appropriate
>>>>> and/or is there a better way?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Steve
>>
>>
Thanks. I thnk you hit the nail on the head in that at one point a long
time ago I did use the Publish Web Site tool and probably did not check that
option.

It looks like I've resolved it by deleting the entire remote site and then
using Copy Web over again.

Steve

"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:%235MIaCTuFHA.3188@.TK2MSFTNGP14.phx.gbl...
> Hi, Steve.
> What this sounds like is that, at some point, the "Publish Web Site"
> tool was used instead of the "Copy Web" tool, and that the
> "Allow this precompiled site to be updatable" option was not selected.
> See : http://msdn2.microsoft.com/en-us/library/1y1404zt
> for a step-by-step guide to using the "Publish Web Site" tool.
> You can change the "Allow this site...to be updatable" option.
> You might also want to take a look at the "Copying a website" walkthrough:
> http://msdn2.microsoft.com/en-us/library/xay0wxbf
> and at : http://msdn2.microsoft.com/en-us/library/1cc82atw
> "Copying Web Sites with the Copy Web Site Tool"
> You might be missing a key step in the process,
> and reviewing those walkthroughs might point it out to you.
>
>
> Juan T. Llibre
> ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> ==========================
> "Steve Franks" <please@.postreplyhere.com> wrote in message
> news:OeednTMpv_Zaj7XenZ2dnUVZ_s2dnZ2d@.comcast.com. ..
>> Sorry about the confusion. Let me explain specifically what I'm trying
>> to do.
>>
>> Locally I'm using whatever the default settings are, as it relates to
>> precompiling.
>> When I look at the property pages of my ASP.NET web application, and
>> click on the Build
>> section, the revelant sections say "Before running startup page: Build
>> Web Site". And
>> "Build solution action" section has the check box checked for "Build web
>> site as part of
>> solution".
>>
>> That is how I like to run things because I prefer to know about any
>> mishaps I've made
>> coding-wise before the page runs.
>>
>> Now over to production... I like the Copy Web function because it seems
>> like a
>> convenient way from within VS.NET 2005 Beta 2 to easily have it sync the
>> production site
>> with changes as I make them in development.
>>
>> However recently I added a App_Code folder with a few utility classes
>> I've created. Now
>> when I do the Copy Web the production site complains that the App_Code
>> folder is not
>> allowed.
>>
>> So my questions specifically are:
>>
>> 1) Is there a way where I can still use Copy Web in this scenario?
>>
>> 2) If not, how do I tell my local machine to not precompile and clear
>> itself from any
>> precompiled files, so that when I do a copy web the remote site is not in
>> a precompiled
>> mote? In other words, I assume my local machine has the precompiled
>> files that are
>> being copied with Copy Web. So I do these get deleted, and how do I set
>> things set up
>> locally so its no longer prcompiled, so that my production server will be
>> happy once I
>> do a complete Copy Web to try and straighten things out?
>>
>> 3) If I have to resort to a FTP copy, files with what extension should
>> get copied
>> specifically? Or perhaps its easier toi look at it the other way - which
>> file
>> extensions need to be deleted from the production server so it does not
>> see the web
>> pages there as being "precompiled"?
>>
>> Thanks so much. I'm looking forward to your answer as I have been stuck
>> on this for a
>> few days. I really appreciate the help.
>>
>> Steve
>>
>> "Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
>> news:OvKJFZOuFHA.2072@.TK2MSFTNGP14.phx.gbl...
>>> re:
>>>> My preference is to precompile locally as I test and run my app
>>>
>>> I thought you had said you did *not* precompile.
>>> There's a difference between "precompile" and "compile".
>>>
>>> Which one are you doing ?
>>>
>>> Have you tried to FTP your files instead of "publishing" them ?
>>>
>>>
>>>
>>> Juan T. Llibre
>>> ASP.NET MVP
>>> ASP.NET FAQ : http://asp.net.do/faq/
>>> ==========================
>>>
>>> "Steve Franks" <please@.postreplyhere.com> wrote in message
>>> news:gqqdnfBdIfGOFbrenZ2dnUVZ_s2dnZ2d@.comcast.com. ..
>>>> Well, there seems to be some sort of a conflict or design issue here
>>>> with this
>>>> restriction.
>>>>
>>>> I decided I'd just delete my App_Code directory from the remote site.
>>>> I figured this
>>>> would be OK since its tellin gme the application is precompiled. Yet
>>>> then when I go
>>>> to run a page it complains "The name 'myclass' does not exist in the
>>>> current context".
>>>> So if everything was precompiled and no app_code directory is needed
>>>> then what's the
>>>> problem here?
>>>>
>>>> My preference is to precompile locally as I test and run my app, and
>>>> then when I
>>>> publish to the remote server I want to publish all the files. I can't
>>>> seem to work
>>>> around this. Any ideas?
>>>>
>>>> Steve
>>>
>>>> "Brock Allen" <ballen@.NOSPAMdevelop.com> wrote in message
>>>> news:b8743b112290a8c7868466d649ee@.msnews.microsoft .com...
>>>>>I would check your web project's properties under MSBuild.
>>>>>
>>>>> -Brock
>>>>> DevelopMentor
>>>>> http://staff.develop.com/ballen
>>>>>
>>>>>>> Because you're precompiling, everything that would go in the
>>>>>>> App_Code
>>>>>>> directory is already compiled and doesn't need to be uploaded.
>>>>>>>
>>>>>>> If you want to upload your source files into the
>>>>>>> App_Code directory, don't precompile your application.
>>>>>> I am not purposely precompiling my application. How can I prevent it
>>>>>> from precompiling?
>>>>>>
>>>>>> Locally I just use VS.NET 2005 b2 to do the development and press F5
>>>>>> to run it. Sometimes I press F6 to get a sanity check on whether
>>>>>> I've
>>>>>> screwed any code up.
>>>>>>
>>>>>> For production, I want the flexibility to be able to edit source on
>>>>>> the production server to make an update on the fly, so the
>>>>>> precompiled
>>>>>> approach is not of interest.
>>>>>>
>>>>>> My main goal is to just be able to easily synchronize the work I do
>>>>>> at
>>>>>> home on the production server, and then get to work and easily update
>>>>>> my local dev copy of the web app to reflect the changes I've made at
>>>>>> home by syncing with the production server. Then I'll make changes
>>>>>> at
>>>>>> work, and when I get home, I'll want to sync my home machine up with
>>>>>> what's now on the production server, and so forth. Currently I'm
>>>>>> (trying) to use the Copy Web function for this. Is that appropriate
>>>>>> and/or is there a better way?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Steve
>>>
>>>
>>
>>
Thanks again Juan. On a different subject - since we are talking I was
wondering what approach you use to resolve the issue I posted about in a
posting called: "How to remove virtual path from root url of dev web server"
in this newsgroup on August 28. Likewise I have a similiar issue that I
posted about under the subject "Masterpage issue with relative links to
background images" on August 27.

It would be great if you could please share your thoughts on these
challenges.

Thank you,

Steve

"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:%235MIaCTuFHA.3188@.TK2MSFTNGP14.phx.gbl...
> Hi, Steve.
> What this sounds like is that, at some point, the "Publish Web Site"
> tool was used instead of the "Copy Web" tool, and that the
> "Allow this precompiled site to be updatable" option was not selected.
I have a local 03 server and i'm using IIS6, SQL 2005 and when go to run my aspx page i get "System.Web.HttpException: The directory '/App_Code/' is not allowed because the application is precompiled." but the remote server works fine. any ideas? thanks

Quote:

Originally Posted by Steve Franks

I'm using VS.NET 2005 Beta 2. I have a helper C# class I wrote that I placed
in my /App_Code directory. Everything runs fine locally. However when I
use the "Copy Web" function to upload the site to the production server, I
get the following error when trying to run the page on production:
"System.Web.HttpException: The directory '/App_Code' is not allowed
because the application is precompiled."

Anyone know this works fine locally but not on development? How can I
resolve this?

Also on a related note I read a lot about a new "\code" directory in ASP.NET
2.0. Am I correct to assume that at some point they changed this from \code
to \App_Code and these are the same thing?

Steve

The directory name is invalid

In VS2005 I drop a button and a dropdownlist on a web form.
When I try to change the name of these (i.e. from Button1 to btnEdit)
in the Properties panel, I get a message popping up saying "The
directory name is invalid." and it won't let me change the
name.
Any Ideas?Actually I had a problem like that once with the Beta program, I closed the
solution, open again and I was able to rename it, what version of the VS2005
are you running and did you try that?
Cheers
Al
"jhcorey@.yahoo.com" wrote:

> In VS2005 I drop a button and a dropdownlist on a web form.
> When I try to change the name of these (i.e. from Button1 to btnEdit)
> in the Properties panel, I get a message popping up saying "The
> directory name is invalid." and it won't let me change the
> name.
> Any Ideas?
>

The directory name is invalid

In VS2005 I drop a button and a dropdownlist on a web form.
When I try to change the name of these (i.e. from Button1 to btnEdit)
in the Properties panel, I get a message popping up saying "The
directory name is invalid." and it won't let me change the
name.
Any Ideas?Actually I had a problem like that once with the Beta program, I closed the
solution, open again and I was able to rename it, what version of the VS2005
are you running and did you try that?

Cheers
Al

"jhcorey@.yahoo.com" wrote:

> In VS2005 I drop a button and a dropdownlist on a web form.
> When I try to change the name of these (i.e. from Button1 to btnEdit)
> in the Properties panel, I get a message popping up saying "The
> directory name is invalid." and it won't let me change the
> name.
> Any Ideas?
>

The Ellipsis (.) Character Is Not Showing Up When Read From A Text File

I have a page which reads the the first line of every *.txt file in a
certain directory of mine to use as the Text property of a HyperLink
Control. However, in one of my recently added text files in the directory it
is using all but the ellipsis character (this is the last character in the
line, but it does the same thing when I place the character in other
places). For example, here is what the line looks like in the *.txt file and
the generated HTML code:
*.txt File:
Whate.ver you say.
HTML Code:
Whatever you say
When I create the text files, which I do in Windows Notepad on Windows XP
Pro SP2, I enter the character using the ALT+0133 key combination. Even if
ASP.NET did not recognize this character, I would at least expect it to put
some character in it's place, even if it was not the one I wanted. When
reading the *.txt file I use the System.IO.StreamReader.ReadLine() method. I
am assuming the fix has something to do with the character sets I am using
when creating and/or reading the *.txt files, but I was unable to find the
character set that Notepad saves the file as. Can somebody help me here?
Thanks.
--
Nathan Sokalski
njsokalski@dotnet.itags.org.hotmail.com
http://www.nathansokalski.com/
>but I was unable to find the
>character set that Notepad saves the file as. Can somebody help me here?
The Encoding field in Notepad's File -> Save As... dialog.
Mattias
Mattias Sjgren [C# MVP] mattias @. mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.