sridhar
  •  sridhar
  • 56% (Neutral)
  • YAF Forumling Topic Starter
2009-05-18T04:51:20Z
Hi Friends,

I tried to create a simple test website with one master page having link to forum.aspx page.( i created this website to test how it works in existing site)

i followed the instructions that are provided in the link

http://wiki.yetanotherfo...h%20existing%20site.ashx 

initially my site does not contain any bin folder or any xml file.so i just cut and paste the xml files of YAF in my root directory.and followed every step provided in the above link.

in forum.aspx page i write the following code

Response.Redirect("~/Yaf/"); ( i placed YAF1.9.3 code in my site Yaf folder) in page_load method.


but when i execute the site and click the link..it is giving error..i am copying the error below..

Server Error in '/YAF-Trial' Application.


The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /yaf-trial/Error.aspx


i have my site files in YAF-Trial folder.

i used the bin version of YAF1.9.3 version. i run it in VS-2005.


it is successfully executed if i not included in the existing site.



Please help me out...Thanks in advance...





Sponsor
Slick86_98
2009-05-18T11:15:29Z
Response.Redirect("~/Yaf/";


Why do you have this for your redirect if the forum is located in the YAF-Trial folder? Is your YAF.Root set correctly in App.config?
sridhar
  •  sridhar
  • 56% (Neutral)
  • YAF Forumling Topic Starter
2009-05-18T20:10:49Z
Thansk for reply...

My testing site has in the folder YAF-Trial...and YAF forum code is in /Yaf folder...



sridhar
  •  sridhar
  • 56% (Neutral)
  • YAF Forumling Topic Starter
2009-05-18T21:02:44Z
i added these statements in app.config file

<add key="YAF.Root" value="/Yaf"/>

<add key="root" value="/Yaf"/>
Slick86_98
2009-05-19T11:31:25Z
I assume both of those folders are in the root of the site.

To fix:
Quote:


Server Error in '/YAF-Trial' Application.



The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /yaf-trial/Error.aspx



Instead of having
<customErrors defaultRedirect="Error.aspx" mode="On"/>

use
<customErrors defaultRedirect="/Yaf/Error.aspx" mode="Off"/>
in your web.config. The error message should then work.

Because Yaf is not a folder in YAF-Trial,
Response.Redirect("~/Yaf/";

has to be changed to
Response.Redirect("/Yaf/";

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved