Home Search Member List Faq Register Login  
UltimateSearchMVC
Re: Not able to make index for cshtml pages

Thread Starter: Himanshu Goel   Started: 11-25-2013 10:22 PM   Replies: 3
 Karamasoft Support Forums » General Discussions » UltimateSearchMVC » Re: Not able to make index for cshtml pages
 Printable Version    « Previous Thread   Next Thread »
  25 Nov 2013, 10:22 PM
Himanshu Goel is not online. Last active: 11/26/2013 9:48:04 PM Himanshu Goel

Not Ranked
Joined on 11-25-2013
India
Posts 4
Not able to make index for cshtml pages
Hi Team,

I am unable to set index for my any of cshtml pages by including file type "cshtml"
" includeFileType cshtml includeFileType " in UltimateSearch.config.

When ever I try to create Indexes for my cshtml pages (these cshtml pages have proper controller and model associated with them) on UltimateSearch.admin.aspx I am getting Status as "fail"

For example :
1) I write this code in Controller >> HomeController
----------------------------
public ActionResult MyCshtmlPage()
{
return View();
}
----------------------------
2) and then I made a associated view "MyCshtmlPage" in views >> Home >> MyCshtmlPage.cshtml and write some text in it.

3) I build the project and then I try to create index from UltimateSearch.admin.aspx, I am getting status as fail against this page.

Kindly let me know where I could be wrong.

  
  26 Nov 2013, 11:11 AM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Not able to make index for cshtml pages
Are you opening a page with its .cshtml extension in a browser? How do you open that page in a browser window? Whatever the url is in your browser, you should have a link to that url from another page or in your scanUrlList.
  
  26 Nov 2013, 9:38 PM
Himanshu Goel is not online. Last active: 11/26/2013 9:48:04 PM Himanshu Goel

Not Ranked
Joined on 11-25-2013
India
Posts 4
 Re: Not able to make index for cshtml pages
No, I do not open pages with .cshtml extension in a browser. In case my view name is MyCshtmlPage.cshtml then I have to write "http://localhost/Home/MyCshtmlPage " in browser window.

Now I am able to create indexes for my cshtml pages by writing the exact url I have in my browser under scanUrlList tags SmileBig Smile but I have more than 350 cshtml pages in my website. Do I need to write Url of every page manually under scanUrlList? Is there any better way for this becase in future my pages count may increase and at that time I have to keep checking my scanUrlList.


  
  27 Nov 2013, 9:12 AM
Karamasoft is not online. Last active: 5/8/2018 10:36:45 AM Karamasoft

Top 10 Posts
Joined on 09-05-2004
Posts 6,820
Re: Not able to make index for cshtml pages
It depends on how you're pointing from one page to another. When you open a page like "http://localhost/Home/MyCshtmlPage" in a browser window, how do you have links to other pages? Are they in the form of <a href="http://localhost/Home/MyCshtmlPage2">My Page 2</a> or do you have those links generated dynamically in your code-behind such as a controller?

When UltimateSearch crawls a page, it does two things:

1) Parse the content and index the words
2) Identify the links and keep crawling them

If it cannot identify the links it won't be able to crawl and index them. So, if that's the case your only option is to list them either in scanUrlList in the config file, or put them in an external XML file and use scanXmlList. Then you won't have to rely on the links in your pages.

  
 Page 1 of 1 (4 items)
Karamasoft Support Forums » General Discussions » UltimateSearchMVC » Re: Not able to make index for cshtml pages

You can add attachments
You can post new topics
You can reply to topics
You can delete your posts
You can edit your posts
You can create polls
You can vote in polls
Forum statistics are enabled
Forum is unmoderated

© 2002-2018 Karamasoft LLC. All rights reserved.