|
-
Nov 4th, 2002, 11:31 AM
#1
Thread Starter
Addicted Member
please help, i am trying to edit the web.config file from within a web app but..
please help, i am trying to edit the web.config file from within a web app but i am getting this error
Server Error in '/IISapps' Application.
--------------------------------------------------------------------------------
The same table (add) cannot be the child table in two nested relations.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: The same table (add) cannot be the child table in two nested relations.
i have crystal reports and appSettings setup in my web.config file:
<compilation>
<assemblies>
<add assembly="CrystalDecisions.CrystalReports..../>
<add assembly="CrystalDecisions.ReportSource..../>
<add assembly="CrystalDecisions.Shared..../>
<add assembly="CrystalDecisions.Web..../>
</assemblies>
</compilation>
and
<appSettings>
<add key="gConnection" value="data source=localhost../>
</appSettings>
so there are two streams of "add" can i change these so i can use this line of code:
Dim dr() As DataRow = ds.Tables("add").Select(String.Concat("key='", key, "'"))
???????
any ideas??
-
Nov 4th, 2002, 07:35 PM
#2
Hyperactive Member
Sorry I'm here to provide a solution but I would suggest that when you do find one use a custom configuration file. When web.config is altered it causes the application to restart which is not desirable (i.e. slower performance for the user).
-
Nov 5th, 2002, 04:15 AM
#3
Thread Starter
Addicted Member
custom.config??
when i set the connection in the componant it automatically creates the "add key" in the web.config and i can't change it to custom.config!
can i put the crystal reports section into the custom.config file?
-
Nov 5th, 2002, 01:30 PM
#4
Hyperactive Member
You could create a config.xml and edit it using datasets or xml writers. If, as you say, you are using a component it sounds like it uses the web.config by default. Can you change this?
Also only change values in the appSettings section. This is the only part of web.config designed for custom values.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|