[Mono-dev] mono ignoring my web.config
tscharf
tony at mtx-media.com
Fri Sep 15 17:51:19 EDT 2006
I have been fighting and googling this all day, and I am at somewhat of a
loss...
Essentially, I only got started using mono recently, and am doing so in more
of a testing capacity than anything. I have simple (almost stupid) test app
that is basicaly two files:
index.aspx
Web.config
both are in the same directory. I am attempting to simply get a value out
of the appSettings part of the Web.config.
my Web.config looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="test" value="helo1344" />
</appSettings>
</configuration>
my index.aspx looks like this:
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>stupid little test page</title>
<script language="c#" runat=server></script>
</head>
<body>
<%
Response.Write("test config reader: " +
System.Configuration.ConfigurationSettings.AppSettings["test"]);
%>
</body>
</html>
when I put these on my windows server and run it, I get what i expect, a
page with the text:
test config reader: test1344
when I do this on my mono server, i get this:
test config reader:
No errors are reported.
I really dont know what to do here. is this a bug in mono? as far as I can
tell, i have everythign in mono configured correctly (using the zero
configuration method, so that I dont need to play with apache configs for
each virtual host).
There is probably something staring me in the face, which I am going to feel
like moron #1 for not seeing...
everything is C#, mono is 1.0 (i had trouble getting Mono 2.0 to work yet on
my ubuntu box)
Can anyone help?
Thanks,
T.
--
View this message in context: http://www.nabble.com/mono-ignoring-my-web.config-tf2280110.html#a6333823
Sent from the Mono - Dev forum at Nabble.com.
More information about the Mono-devel-list
mailing list