|
Hi RaviJJain,
Yes,we can add more than one web.config in one project.
But Level of .Config file is must be different.
If you add one web.config file at root of your web application, you can add new .Config file in different folder in your application.
As an example,
you don't want to access any anonymous user to view content of "masteradmin" folder. For this purpose you can add new .Config file in your "masteradmin" folder.
Here if you have allready <--authentication><--/authentication> part in root's web.config and you have same <--authentication> block in "masteradmin"'s .config file, <--authentication> block that is for "masteradmin" folder is overriden from Root's config file.
-- modified at 3:08 Thursday 12th July, 2007
-- modified at 3:09 Thursday 12th July, 2007
Mustakim Mansuri
|
|
|
|
|
Yes we can have more than 1 web.config file.For each folder you can have one web.config file
Regards,
Niranjan
|
|
|
|
|
Hi all... I have a small but nasty problem which threatens to end me, quite frankly. I'm developing two complementary ASP.net applications, one of which is an e-commerce/online shop app, the other is an information site, and the client, for marketing reasons, has all of a sudden decided that the shop application must be accessible through the URL
http://www.infositeurl.com/shop
whereas it had been set up using a third level domain, i.e.
http://www.shop.infositeurl.com
I have set up the sites using the virtual directory feature of IIS, so that a request for the URL http://www.infositeurl.com/shop goes to the correct directory for the shop application. But here's my problem - any references or links of the form
src="/approot/subfolder/subsubfolder/resource.ext"
are broken. They're pointing to the root of the infosite application. This is causing me no end of grief. It doesn't happen when I access the site using a third level domain. What is happening seems to be that IIS doesn't see it as an application in itself, and so routes all root directory calls to the parent app, but how can I turn this off? I can't find any setting in IIS which will sort this for me. Does anybody know af any web config setting that would affect this? I really don't want to have to go into my app checking every single link just because of a URL change...
All the dude ever wanted... was his rug back.
|
|
|
|
|
melchizidech wrote: src="/approot/subfolder/subsubfolder/resource.ext"
Root of that virtual directory is shop . When you are using virtual directories you need to specify the path like ../approot/ . In your case, you can remove virtual directory. Create a folder in root called shop and remove the virtual directory. This will solve your problems. Also put a default document in shop directory which will get loaded when request comes to http://www.infositeurl.com/shop/ .
|
|
|
|
|
So you mean physically place the shop application in an actual directory called Shop in the main site's root? See, that was what I originally tried, but I got the same result.
When you say "you need to specify the path like .../approot/" do you mean when specifying links to resources? because that's exactly what I'm trying to avoid. I've written this separate application, with hundreds of links in it all relative to the application root, and I can't face the thought of going in and hand-coding every single reference in the site to work with the new setup.
All the dude ever wanted... was his rug back.
|
|
|
|
|
melchizidech wrote: So you mean physically place the shop application in an actual directory called Shop in the main site's root? See, that was what I originally tried, but I got the same result.
Yes I mean that. Could you tell me what error you got ? Usually it won't show any problem. I used this in several places.
melchizidech wrote: When you say "you need to specify the path like .../approot/" do you mean when specifying links to resources?
Yes. I know this is not a good method since you have already written the other one, but I don't find any other way to specify resources when you are using virtual directories.
|
|
|
|
|
Navaneeth. wrote:
Yes I mean that. Could you tell me what error you got ? Usually it won't show any problem. I used this in several places.
The error I'm talking about is that all references (stylesheets, Web User Control directives, JS files, hyperlinks) are now going to the root of the parent application, whether or not the child application is placed in a subfolder of the root directory of the parent. As you can imagine, this is causing the site to pretty much fall apart. If the method you specified above is the only way then I've got a lot of remedial coding to do.
All the dude ever wanted... was his rug back.
|
|
|
|
|
melchizidech wrote: The error I'm talking about is that all references (stylesheets, Web User Control directives, JS files, hyperlinks) are now going to the root of the parent application
Still I am not getting how you are getting error on this case. Referring the resources like /foldername/filename will look in the root for the foldername. So there won't be any chance for getting error. And that will be easy solution rather than modifying all parts to ../foldername/filename.
But if you are putting your child application in a folder as we discussed you need to take care about these
1. Root and child application should share same bin directory that is located on the root
2. You need to copy all the assemblies located on child bin to main root bin
3. I suggest to use common web.config also.
Now try again. I think this should work.
|
|
|
|
|
Hi, thanks for all your help firstly, but I know of the approach you're talking about, and the problem is this - I need to be able to separate the two applications in the future. I don't want to share the web.config as the plan is at some stage they will be hosted on different servers. But for now, they are two stand-alone apps and have been developed as such. If I actually qualify all my links from the shop applocation with /shop/foldername/resource.ext, then if I move it to its own directory at a later stage it'll break again.
All the dude ever wanted... was his rug back.
|
|
|
|
|
Hi to all....
Actually i develop a report in ASP.NET 2.0 and passing some criteria fields like From date and todate in parameter field....Parameter field display successfully when i write the code in load event...but when i select criteria fromdate-todate and courier name and press generate button then error will generate Missing parameter Values
I cann't understand why error generated when i press button while its working fine when call on load event with fix parameter....
Below are the sample code for your Information
private void GenerateReport()
{
try
{
//-------------------------------
//Report view Code
//-------------------------------
System.DateTime dtfrom;
System.DateTime dtTo;
dtfrom = Convert.ToDateTime(dtp_FromDate.Value);
dtTo = Convert.ToDateTime(dtp_ToDate.Value);
//-------------------------------
//Object Creation
BLLOUTGOINGMAIL oBLLOUTGOINGMAIL = new BLLOUTGOINGMAIL();
DataSet ods = new DataSet();
//ods = oBLLOUTGOINGMAIL.GetExpStatData("OUTGOINGMAIL.COURIERID = '" + ddlCourier.SelectedValue + "' AND OUTGOINGMAIL.OGDATE BETWEEN '" + dtfrom.ToString("dd/MMM/yyyy") + "' AND '" + dtTo.ToString("dd/MMM/yyyy") + "'");
ods = oBLLOUTGOINGMAIL.GetExpStatData("OUTGOINGMAIL.COURIERID = '00001' AND OUTGOINGMAIL.OGDATE BETWEEN '01/JAN/2007' AND '01/DEC/2007'");
ods.Tables[0].TableName = "dtExpStat";
ReportDocument rd = new ReportDocument();
rd.Load(Server.MapPath("CRExpStat.rpt"));
rd.SetDataSource(ods);
//---------------------------------------------------------------
// Create parameter objects
ParameterFields myParams = new ParameterFields();
ParameterField myparamFields = new ParameterField();
ParameterDiscreteValue myDiscreteValue = new ParameterDiscreteValue();
// Set the ParameterFieldName to the name of the parameter
// created in the Field Explorer
myparamFields.ParameterFieldName = "p_ReportHeader";
// Add ReportHeader Value
//Add Courier Value // Add Date From Value // Add To Date Value
myDiscreteValue.Value = ddlCourier.SelectedItem.Text + " (For the period " + dtfrom.ToString("dd/MMM/yyyy") + " To " + dtTo.ToString("dd/MMM/yyyy") +")";
myparamFields.CurrentValues.Add(myDiscreteValue);
// Add param object to params collection
myParams.Add(myparamFields);
// Assign the params collection to the report viewer
CRV_ExpStat.ParameterFieldInfo = myParams;
//---------------------------------------------------------------
CRV_ExpStat.ReportSource = rd;
CRV_ExpStat.DataBind();
rd = null;
//---------------------------------------------------------------
}
catch (ExceptionClass oEx)
{
WrapperOfLogError oWrapperOfLogError = new WrapperOfLogError();
ucMessageControl.Show(UC_MessageControl.MessageType.ErrorMessage, ConfigurationManager.AppSettings[oWrapperOfLogError.BLLWrapperOfLogError(oEx)]);
}
}
protected void btnReport_Click(object sender, ImageClickEventArgs e)
{
GenerateReport();
}
Haseeb.
|
|
|
|
|
Hi,
I am creating a table using javascript using a recordset.I am applying style sheets and javascript functions to the table. But the stylesheets and javascript functions are not getting applied. My the function for table creation is as follow.
function showReports(){
try{
var objConn;
//var test=document.getElementById("mysheet").cssRules[0].style.color;
var empId = document.getElementById('hdnEmpId');
var aServer = "10.11.50.15";
var uid = "sa";
var pwd = "mis";
var Database = "GSMail";
var conn_str = "DRIVER={SQL SERVER};SERVER=" + aServer + ";UID=" + uid + ";PWD=" + pwd + ";" + "Database=" + Database + ";"
var strHtml ="";
strHtml +="
|
|
|
|
|
Rajiya wrote: I am creating a table using javascript using a recordset.
Recordset in javascript ?
In your example I am not getting where you used CSS classes ?
|
|
|
|
|
Hi,
Actually it's not getting style sheets and javascript events becoz document.write(strHtml) is writing the script on a new document.and on the new document it is not finding the javascript and style sheet.
Does anybody knw how do i write on the current window and not on the new window?
Thanks,
Riz
|
|
|
|
|
hi
I am in middle of my project and need help with chat system for asp.net Can anybody help me find some multiroom/multiuser chat system for asp.net opnsource
regards
Harry
|
|
|
|
|
Get it[^]
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
hi
thanks for your reply but i need free text chat with asp.net support the link you sent me take me to paid chats
Adn also can you help me with rating system
regards
Harry
|
|
|
|
|
harryforum wrote: i need free text chat with asp.net support the link you sent me take me to paid chats
Why don't you search in SourceForge[^]
|
|
|
|
|
|
hi
thanks for your quick response but can you give me any multiuser/multiroom chat link ie opensource
and i also mentioned a rating system
thanks
regards
Harry
|
|
|
|
|
download that source code and rum it in ur local server.
These two applications are multiuser/multiroom chat application.
check out it again.
and tell me what is about rating system in chat application?
Best regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Sheesh. These people have really put themselves out for you looking for things that you really should be able to find for yourself using Google. Repeat after me:
"Google is my friend. I will use it first. I will not ask other people to do my work for me."
"Google is my friend. I will use it first. I will not ask other people to do my work for me."
"Google is my friend. I will use it first. I will not ask other people to do my work for me."
|
|
|
|
|
I want code on how to import Mail Contacts i.e, yahoo,gmail etc from Asp.net
I got some sripts in php but i didn't get any classes in asp.net.
If any body knows help me.
Regards,
Niranjan
|
|
|
|
|
|
Hi Michael,
I didn't get any source. Using Gmail Api is only to retrieve gmail contacts, but what about other mails and this Gmail Api also not working for me.
If you have any sample please send me........
Thank you
Regards,
Niranjan
|
|
|
|
|
hi friends
In my project i user phonenumber . i entered 10digit number.it show the errror"Arithmetic operation resulted in an overflow"
i get phone number like this txtphone.Text
can u help me
regards
saravanan
|
|
|
|