Welcome Guest! To enable all features please Login or Register.
Options
View
Go to last post Go to first unread
Offline dbaron  
#1 Posted : Monday, March 27, 2017 3:25:33 PM(UTC)
dbaron


Rank: YAF Forumling

Reputation:

Joined: 2/8/2017(UTC)
Posts: 1
United States
Location: Denver

Hello,

I would like to use YAF within my own custom APS.NET web site. I have downloaded 'everything' and am trying first to get the Sample to run.

I literally downloaded it, extracted it, ran the .sln (which launches VS2015), built and ran.

First I ran into missing system.web.helpers dll and system.web.mvc dll.... got both of them downloaded and referenced.

Now the issue is:
Parser Error Message: This method cannot be called during the application's pre-start initialization phase.

Line 90: <providers>
Line 91: <clear/>
Line 92: <add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafMembershipProvider" requiresUniqueEmail="true" useSalt="true" type="YAF.Providers.Membership.YafMembershipProvider"/>
Line 93: </providers>

I did a tiny bit of research...someone with a similar issue (not YAF) suggested modifying web.config app settings from:
<appSettings configSource="app.config"/>
to:
<appSettings>
<add key="configSource" value="app.config"/>
<add key="enableSimpleMembership" value="false"/>
<add key="autoFormsAuthentication" value="false"/>
</appSettings>

That produces the following issue:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Let me ask... is there a list of steps I should be taking after extracting the Sample? I know there are some with the 'regular' install, but, I 'assumed' that the Sample was 100% self-contained and ready to go....

Thanks,

-David
Sponsor
Offline Zero2Cool  
#2 Posted : Wednesday, March 29, 2017 7:22:11 AM(UTC)
Zero2Cool


Rank: YAF Leader

Reputation:

Medals: Medal of Honor for the Support Knight: Given to a community member who has assisted lots and lots of people!

Joined: 4/26/2011(UTC)
Posts: 1,061
Man
United States
Location: in a van down by the river

Thanks: 233 times
Was thanked: 101 time(s) in 92 post(s)
The Wiki should cover all that is needed. Linked to it below. As for your specific issue, a network-related error happened because the connection to the database failed. Either the database doesn't exist or incorrect login information used.

https://github.com/YAFNE...ting-ASP.NET-Application
ASP.NET w/Bootstrap and YAF 2.2.2
SQL Server 2014
Offline johnyjj2  
#3 Posted : Tuesday, July 11, 2017 6:40:21 AM(UTC)
johnyjj2


Rank: YAF Forumling

Reputation:

Joined: 1/31/2016(UTC)
Posts: 2
United Kingdom
Location: UK

Thanks: 1 times
Hi, could you, please, provide me with the information how to eliminate this error?

I have downloaded C# example and I see that it is already configured as in this GitHub explanation, i.e. app_data, app_browsers, bin and all the .config files are in YAF.SampleWebApplication-v2.2.3-C\YAF.SampleWebApplication. Also, app.config contains both <add key="YAF.FileRoot" value="~/forum"/> and <add key="YAF.AppRoot" value="~/forum" />.

When I start it, I get
Quote:
This method cannot be called during the application's pre-start initialization phase
for
Quote:
<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafMembershipProvider" requiresUniqueEmail="true" useSalt="true" type="YAF.Providers.Membership.YafMembershipProvider"/>


I can see there is "yafnet [YAF.SampleWebApplication]" in "Server Explorer" but without tables. How do I fix YafMembershipProvider and create valid database? I want to start writing my application by running sample C# forum, then debugging it to understand how it works and finally tweaking it to my needs (which may require implementing some new features). Where can I find, in the documentation, how to debug "YAFNET-2.2.3\yafsrc" together with "YAF.SampleWebApplication-v2.2.3-C"?

Thank you!

Edited by user Tuesday, July 11, 2017 9:53:25 AM(UTC)  | Reason: Not specified

Offline tha_watcha  
#4 Posted : Tuesday, July 11, 2017 12:13:44 PM(UTC)
tha_watcha


Rank: YAF.NET Project Lead

Reputation:

Medals: Medal of Honor: Portal Puzzle Master: Portal Puzzle Master for DNNMedal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.DNN Master: DNN Module ManBug Killer Medal of Honor: Medal for being a kick-ass bug killer!Medal of Honor for the Support King: Support King! Amazing asset to the YAF.NET Community.

Joined: 3/6/2010(UTC)
Posts: 3,664
Germany

Thanks: 70 times
Was thanked: 1140 time(s) in 970 post(s)
You need to start the install wizard under Forum/Install/Default.aspx
Rss Feed  Atom Feed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error