- Joined
- Apr 8, 2009
- Messages
- 96
- Reaction score
- 56
Here i will quickly explain how to setup the Central Market System for your Corsair-Server.
I assume you already know how to install IIS with ASP.net or even have it installed properly as that is needed for the market that is a web application based system.
1. Setting up the folders and permissions.
2. Creating the Websites in IIS
3. What goes into which folder
4. The 'web.config' configuration and the one XML
5. Add the Domain to your windows hosts file
6. Telling your client where the market is
The websites will generate logfiles on drive C: usually. There should be a new folder whenever the websites do things or you try to access them from inside the game. The folder is called 'palog' and inside there you should find three more folders called 'api-trade', 'gameweb', 'tradeweb'. In there are Json logfiles that log every action the web does, from starting to logging errors when things do not work the way you want them to.
If you get an Auth-Error this probably means your client sends invaled auth information and maybe can not be used. I use the client from the pack and it works fine.
If you get the 'uspIsGameMaster' expects 'atNationCode', but it was not provided error let me know i have a fix for that.
I hope this now helps all to try and setup a running central market for their server.
I assume you already know how to install IIS with ASP.net or even have it installed properly as that is needed for the market that is a web application based system.
1. Setting up the folders and permissions.
On your maindrive, usually C: you should have a new folder called 'inetpub' that was created by the IIS install process. Thats where all the websites go. Now go into the folder and create three folders for the three websites we need:
api-trade, game, trade
Here is what i named them for my server:
https://imgur.com/4c3AEyS
Next is the permissions for the IIS user as it needs to run aka execute things for the central market. The Username of IIS is 'IIS_IUSRS' without quotes. Now rightclick the first of your three folders, properties, tab security.
Top half of the window, Edit, in the new window that pops up, add.
Another window will pop up there you type in the IIS username where it says Object Name
https://imgur.com/xf2CDu7
After that you hit 'Check Name', if you have no typo you will see that it gets underlined and your server name gets added to it which then looks like 'server name\IIS_IUSRS' after thats done you hit okay and in the window 'permissions for "folder name"' in the top half you can find the newly added IIS user, click it in the list and at the lower half of the window you can set the permissions for said user.
Tick the left boxes which should say 'Grant' or something similar in english for "read and execute", "list/view", "read"
Here is another picture of that window with the boxes ticked:
https://imgur.com/TeKRKxf
After that you hit apply and ok and do the same for the other window, if apply needs to be hit, click it before you click okay.
That permission step you now do for all three folders. It is exactly the same.
api-trade, game, trade
Here is what i named them for my server:
https://imgur.com/4c3AEyS
Next is the permissions for the IIS user as it needs to run aka execute things for the central market. The Username of IIS is 'IIS_IUSRS' without quotes. Now rightclick the first of your three folders, properties, tab security.
Top half of the window, Edit, in the new window that pops up, add.
Another window will pop up there you type in the IIS username where it says Object Name
https://imgur.com/xf2CDu7
After that you hit 'Check Name', if you have no typo you will see that it gets underlined and your server name gets added to it which then looks like 'server name\IIS_IUSRS' after thats done you hit okay and in the window 'permissions for "folder name"' in the top half you can find the newly added IIS user, click it in the list and at the lower half of the window you can set the permissions for said user.
Tick the left boxes which should say 'Grant' or something similar in english for "read and execute", "list/view", "read"
Here is another picture of that window with the boxes ticked:
https://imgur.com/TeKRKxf
After that you hit apply and ok and do the same for the other window, if apply needs to be hit, click it before you click okay.
That permission step you now do for all three folders. It is exactly the same.
2. Creating the Websites in IIS
For this step we just assume the fake domain 'local-bdo.net' as probably many don't have a domain at all. You can change this to whatever you want, Just make sure you use URL safe characters and no funky stuff.
Open up your IIS and on the left hand side click through until you see the default site. You can leave it there, or delete it does not matter.
Rightclick on the sites folder and click 'Add Website/New Website' you will get a new window and we will start with 'api-trade'.
The sitename can be whatever you want but you should name it in a way that you know what it is. so i simply name it 'api-trade'.
The Application.Pool will take the name of your site automatically no need to change anything there.
Next set the physical path, thats where your website folder for 'api-trade' is located in my case it is 'C:\inetpub\bdo-api-trade'
For binding if you have no domain and certificate leave it at http put in your servers IP can be internal or external depending on what you need. Default http port is 80 and for hostname you now need to make up the sub domain so in my case its 'api-trade.local-bdo.net'
Here is a screenshot of what it looks like for local use in an internal network:
https://imgur.com/j6zmPYs
After that you just hit okay and do it two more times for 'game' and 'trade'
Screenshot for 'game':
https://imgur.com/PMG04TF
Screenshot for 'trade':
https://imgur.com/zQnVsLN
Now you should have three websites running in IIS but there is nothing in it which we will fix in the next step.
Open up your IIS and on the left hand side click through until you see the default site. You can leave it there, or delete it does not matter.
Rightclick on the sites folder and click 'Add Website/New Website' you will get a new window and we will start with 'api-trade'.
The sitename can be whatever you want but you should name it in a way that you know what it is. so i simply name it 'api-trade'.
The Application.Pool will take the name of your site automatically no need to change anything there.
Next set the physical path, thats where your website folder for 'api-trade' is located in my case it is 'C:\inetpub\bdo-api-trade'
For binding if you have no domain and certificate leave it at http put in your servers IP can be internal or external depending on what you need. Default http port is 80 and for hostname you now need to make up the sub domain so in my case its 'api-trade.local-bdo.net'
Here is a screenshot of what it looks like for local use in an internal network:
https://imgur.com/j6zmPYs
After that you just hit okay and do it two more times for 'game' and 'trade'
Screenshot for 'game':
https://imgur.com/PMG04TF
Screenshot for 'trade':
https://imgur.com/zQnVsLN
Now you should have three websites running in IIS but there is nothing in it which we will fix in the next step.
3. What goes into which folder
Welcome to the chaos of how many 'zips' and 'rars' can you stuff into a folder to confuse users.
Basically the zipped stuff are other versions, sometimes just minor dll versions, sometimes major. Here is what i picked and worked for me.
When you get the server pack there are two 'market' folders in there, one is just 'Market' and the other is 'TradeMarketProcessWeb', we take the second one.
'api-trade':
Inside you will find a folder called 'GB.BlackDesert.Trade.Web.Process' everything that is in there goes into the folder of your 'api-trade' website. You can leave the zips/rars there or remove them, they don't hurt and are simply ignored by the web application.
https://imgur.com/SjIjy0o
'game':
The folder for the 'game' website is called 'GB.BlackDesert.Trade.Web.Game' and all contents of that folder go into your game website folder
https://imgur.com/TsKTKZZ
'trade':
for the 'trade' website there are two folders that go into it, these are called 'GB.BlackDesert.Trade.Web' and 'GB.BlackDesert.Trade.Web.Contents'. The first folder goes all in the second just the folder ignore the version.txt and web.config in there. I have clicked all that goes in this screenshot so this should better show with what i mean:
https://imgur.com/A2wqKCa
When you have everything in place we are ready to go to the next step which is editing the 'web.config' files.
Basically the zipped stuff are other versions, sometimes just minor dll versions, sometimes major. Here is what i picked and worked for me.
When you get the server pack there are two 'market' folders in there, one is just 'Market' and the other is 'TradeMarketProcessWeb', we take the second one.
'api-trade':
Inside you will find a folder called 'GB.BlackDesert.Trade.Web.Process' everything that is in there goes into the folder of your 'api-trade' website. You can leave the zips/rars there or remove them, they don't hurt and are simply ignored by the web application.
https://imgur.com/SjIjy0o
'game':
The folder for the 'game' website is called 'GB.BlackDesert.Trade.Web.Game' and all contents of that folder go into your game website folder
https://imgur.com/TsKTKZZ
'trade':
for the 'trade' website there are two folders that go into it, these are called 'GB.BlackDesert.Trade.Web' and 'GB.BlackDesert.Trade.Web.Contents'. The first folder goes all in the second just the folder ignore the version.txt and web.config in there. I have clicked all that goes in this screenshot so this should better show with what i mean:
https://imgur.com/A2wqKCa
When you have everything in place we are ready to go to the next step which is editing the 'web.config' files.
4. The 'web.config' configuration and the one XML
If you stuck with the subdomain names 'api-trade', 'game' and 'trade' this will probably really easy. You can open these files with almost any texteditor, my personal choices are either notepad++ or sublime.
go into your 'api-trade' website folder and open up the web.config in there. I will just give you my 'web.config' here you just need to replace IPs and domains with yours.
The IP you need to replace with yours is 192.168.255.130, don't worry it is an internal IP of a VMware machine, so no exposure to the outside world.
The domain name is 'local-bdo.net' you can keep that or replace with yours, but keep in mind it has to match with what you have setup in the IIS Website step as all three of those sites can and need to talk to each other, so if one does not find the other things will break.
you will see 'connectionString' in all three web.config files. Those lines define where your webserver finds the SQL-Server. The Databases are already linked up properly you just need to change the IP-Adresses to your SQL-Server and make a decission if you want to create the extra DB-User the web application uses or replace it with the default one the server uses. The extra user is 'CrimsonTradeReader' which uses the same password as the 'CrimsonDesert' user.
I have set the websites in 'live mode' and turned of 'debug mode' as i no longer needed it if you need it for any purposes search for
'<add key="isDebug" value="false" />' and set it to true for more logging.
Every time you edit and save one of the 'web.config' files IIS will then auto restart the website that belongs to that file.
The URLs are also set for 'HTTP'!
'api-trade':
'game':
'trade':
This is important don't forget this step or your server simply does not have a running market. In the 'api-trade' folder of your website there is this path 'C:\inetpub\bdo-api-trade\Contents\Common\xml\BDOWorldTradeMarketItemData\NA' and in there is all the extra configuration for the Central Market. It will run with everything default except one file. 'BDOWorldTradeMarketServerInfo' Open this and in there you need to change the IP to yours, here is my file:
Don't forget this!
go into your 'api-trade' website folder and open up the web.config in there. I will just give you my 'web.config' here you just need to replace IPs and domains with yours.
The IP you need to replace with yours is 192.168.255.130, don't worry it is an internal IP of a VMware machine, so no exposure to the outside world.
The domain name is 'local-bdo.net' you can keep that or replace with yours, but keep in mind it has to match with what you have setup in the IIS Website step as all three of those sites can and need to talk to each other, so if one does not find the other things will break.
you will see 'connectionString' in all three web.config files. Those lines define where your webserver finds the SQL-Server. The Databases are already linked up properly you just need to change the IP-Adresses to your SQL-Server and make a decission if you want to create the extra DB-User the web application uses or replace it with the default one the server uses. The extra user is 'CrimsonTradeReader' which uses the same password as the 'CrimsonDesert' user.
I have set the websites in 'live mode' and turned of 'debug mode' as i no longer needed it if you need it for any purposes search for
'<add key="isDebug" value="false" />' and set it to true for more logging.
Every time you edit and save one of the 'web.config' files IIS will then auto restart the website that belongs to that file.
The URLs are also set for 'HTTP'!
'api-trade':
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
ASP.NET 응용 프로그램을 구성하는 방법에 대한 자세한 내용은 다음을 참조하십시오.
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<!-- Log4net -->
<log4net degug="true">
<appender name="COMMONLOGGER" type="log4net.Appender.RollingFileAppender, log4net">
<file type="log4net.Util.PatternString" value="C:/Data/WebLog/GlobalTrade/PC/Process/%property{LOGPATHSTRING}/%date{yyyyMM}/%date{yyyyMMdd}.log" />
<staticLogFileName value="false" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="10KB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="COMMONLOGGER" />
</root>
</log4net>
<appSettings>
<add key="isLive" value="true" />
<add key="cookieDomain" value="local-bdo.net" />
<add key="cdnDomain" value="http://local-bdo.net/test" />
<add key="tradeXMLDomain" value="http://api-trade.local-bdo.net/Contents" />
<add key="AllowIPList" value="127.0.0.1|192.168.255.130" />
<add key="selfServerIP" value="192.168.255.130" />
<add key="isTradeOpen" value="true" />
<add key="allowIndex" value="0" />
<add key="serviceProject" value="BDO" />
<add key="serviceType" value="NA" />
<add key="isPearlApp" value="true" />
<add key="defaultCulture" value="en-US" />
<add key="defaultLanguage" value="en" />
<add key="branches" value="live" />
<add key="platform" value="api-trade" />
<add key="isDebug" value="false" />
</appSettings>
<connectionStrings>
<add connectionString="metadata=res://*/DB.TradeWebDB.csdl|res://*/DB.TradeWebDB.ssdl|res://*/DB.TradeWebDB.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.255.130,1433;initial catalog=SA_BETA_TRADEDB_0002;user id=CrimsonDesert;password=BlackNo.1Game#^%;MultipleActiveResultSets=True;App=EntityFramework"" name="TradeWebDB" providerName="System.Data.EntityClient" />
<add connectionString="metadata=res://*/DB.TradeLogDB.csdl|res://*/DB.TradeLogDB.ssdl|res://*/DB.TradeLogDB.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.255.130,1433;initial catalog=PF_BETA_LOGDB_0001;user id=CrimsonDesert;password=BlackNo.1Game#^%;MultipleActiveResultSets=True;App=EntityFramework"" name="TradeLogDB" providerName="System.Data.EntityClient" />
<add connectionString="metadata=res://*/DB.TradeWorldDB.csdl|res://*/DB.TradeWorldDB.ssdl|res://*/DB.TradeWorldDB.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.255.130,1433;initial catalog=SA_BETA_WORLDDB_0002;persist security info=True;user id=CrimsonDesert;password=BlackNo.1Game#^%;MultipleActiveResultSets=True;application name=EntityFramework"" name="TradeWORLDDB" providerName="System.Data.EntityClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5.2" />
<!--2016.11.15 추가-->
<httpRuntime targetFramework="4.5.2" enableVersionHeader="false" maxRequestLength="10485760" />
<globalization culture="auto" uiCulture="auto" />
</system.web>
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="false">
<requestLimits maxAllowedContentLength="1073741824" maxQueryString="1048567" />
<verbs allowUnlisted="false">
<add verb="GET" allowed="true" />
<add verb="POST" allowed="true" />
</verbs>
</requestFiltering>
</security>
<httpErrors errorMode="Custom">
<remove statusCode="404" />
<error statusCode="404" path="/error" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
</system.codedom>
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="Server" />
<remove name="X-AspNetMvc-Version" />
<remove name="X-AspNet-Version" />
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
'game':
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
ASP.NET 응용 프로그램을 구성하는 방법에 대한 자세한 내용은 다음을 참조하십시오.
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<!-- Log4net -->
<log4net degug="true">
<appender name="COMMONLOGGER" type="log4net.Appender.RollingFileAppender, log4net">
<file type="log4net.Util.PatternString" value="C:/Data/WebLog/TW/GlobalTrade/Game/%property{LOGPATHSTRING}/%date{yyyyMM}/%date{yyyyMMdd}.log" />
<staticLogFileName value="false" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="10KB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="COMMONLOGGER" />
</root>
</log4net>
<appSettings>
<add key="isLive" value="true" />
<add key="cookieDomain" value=".local-bdo.net" />
<add key="processDomain" value="http://api-trade.local-bdo.net/GameProcess" />
<add key="AllowIPList" value="127.0.0.1|192.168.255.130" />
<add key="serviceProject" value="BDO" />
<add key="serviceType" value="NA" />
<add key="isPearlApp" value="true" />
<!-- 인증관련 Config -->
<add key="authCookie" value="TradeAuth_Cookie" />
<add key="authenticationTimeOut" value="120" />
<add key="cdnDomain" value="http://local-bdo.net/test" />
<add key="defaultCulture" value="en-US" />
<add key="defaultLanguage" value="en" />
<add key="isTradeOpen" value="true" />
<!-- UTC 시간 설정 config 시작-->
<!-- 타임존 사용시 -->
<add key="UtcTimeZoneID" value="UTC" />
<!-- 서비스 지역별 UTC -->
<add key="ServiceUtcTime" value="0" />
<!-- 서버시간 사용유무 -->
<add key="isServerTime" value="true" />
<add key="branches" value="live" />
<add key="platform" value="GameWeb" />
<add key="isDebug" value="true" />
<add key="otpAuthUrl" value="localhost" />
<add key="allowBorswerList" value="chrome|" />
</appSettings>
<connectionStrings>
<add name="TradeGameDB_12" connectionString="metadata=res://*/DB.TradeGameDB.csdl|res://*/DB.TradeGameDB.ssdl|res://*/DB.TradeGameDB.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.255.130,1433;initial catalog=SA_BETA_GAMEDB_0002;user id=CrimsonDesert;password=BlackNo.1Game#^%;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
<add name="TradeWORLDDB" connectionString="metadata=res://*/DB.TradeWorldDB.csdl|res://*/DB.TradeWorldDB.ssdl|res://*/DB.TradeWorldDB.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.255.130,1433;initial catalog=SA_BETA_WORLDDB_0002;persist security info=True;user id=CrimsonDesert;password=BlackNo.1Game#^%;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
<add name="TradeWebDB" connectionString="metadata=res://*/DB.TradeWebDB.csdl|res://*/DB.TradeWebDB.ssdl|res://*/DB.TradeWebDB.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.255.130,1433;initial catalog=SA_BETA_TRADEDB_0002;user id=CrimsonTradeReader;password=BlackNo.1Game#^%;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
<add connectionString="metadata=res://*/DB.TradeLogDB.csdl|res://*/DB.TradeLogDB.ssdl|res://*/DB.TradeLogDB.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.255.130,1433;initial catalog=PF_BETA_LOGDB_0001;user id=CrimsonDesert;password=BlackNo.1Game#^%;MultipleActiveResultSets=True;App=EntityFramework"" name="TradeLogDB" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" enableVersionHeader="false" maxRequestLength="10485760" />
<globalization culture="auto" uiCulture="auto" />
<sessionState cookieName="TradeAuth_Session" mode="SQLServer" sqlConnectionString="data source=192.168.255.130,1433;uid=CrimsonWeb;pwd=BlackNo.1Game#^%" />
<machineKey decryption="AES" decryptionKey="4D70FDC82D742312862F720BBF3805C65211BD765A84A1D1" validationKey="92243B9FC458265DBAE46C4D8B4D1ED00AAC9C1AACC3BE1F16002FE0A39553C8BC8999E4B8304230768D2DE74D6FB1E2DA02BA420733B85E8E08ABBAFDDDC93E" />
<httpCookies domain="local-bdo.net" requireSSL="false" />
</system.web>
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="false">
<requestLimits maxAllowedContentLength="1073741824" maxQueryString="1048567" />
<verbs allowUnlisted="false">
<add verb="GET" allowed="true" />
<add verb="POST" allowed="true" />
</verbs>
</requestFiltering>
</security>
<httpErrors errorMode="Custom">
<remove statusCode="404" />
<error statusCode="404" path="/error" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
</system.codedom>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="http://trade.local-bdo.net" />
<add name="Access-Control-Allow-Credentials" value="true" />
<remove name="Server" />
<remove name="X-AspNetMvc-Version" />
<remove name="X-AspNet-Version" />
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
'trade':
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
ASP.NET 응용 프로그램을 구성하는 방법에 대한 자세한 내용은 다음을 참조하십시오.
[url]http://go.microsoft.com/fwlink/?LinkId=301880[/url]
-->
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<!-- Log4net -->
<log4net degug="true">
<appender name="COMMONLOGGER" type="log4net.Appender.RollingFileAppender, log4net">
<file type="log4net.Util.PatternString" value="C:/Data/WebLog/TW/GlobalTrade/Web/%property{LOGPATHSTRING}/%date{yyyyMM}/%date{yyyyMMdd}.log" />
<staticLogFileName value="false" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="10KB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="COMMONLOGGER" />
</root>
</log4net>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<!-- Proxy 사용 여부-->
<add key="isProxy" value="false" />
<add key="webProxyUrl" value="" />
<add key="webProxyPort" value="" />
<!-- Proxy 사용 여부-->
<add key="isLive" value="true" />
<add key="defaultCulture" value="en-US" />
<add key="cultureList" value="en-US" />
<add key="cultureCookieName" value="lang" />
<add key="cookieDomain" value=".local-bdo.net" />
<add key="cdnDomain" value="http://local-bdo.net/test" />
<add key="tradeXMLDomain" value="http://api-trade.local-bdo.net/Contents" />
<add key="gameDomain" value="http://game.local-bdo.net/GameTradeMarket/" />
<add key="processDomain" value="http://api-trade.local-bdo.net/GameProcess" />
<add key="redirectDomain" value="http://www.local-bdo.net" />
<add key="AllowIPList" value="127.0.0.1|192.168.255.130" />
<add key="isTradeOpen" value="true" />
<add key="isTradeWebOpen" value="true" />
<add key="serviceProject" value="BDO" />
<add key="serviceType" value="NA" />
<add key="defaultLanguage" value="en" />
<add key="languageList" value="en" />
<add key="useCookieProtect" value="true" />
<add key="ServiceAuthCookieName" value="" />
<add key="AllowBrowserList" value="chrome|" />
<add key="publishServiceType" value="" />
<!-- 인증관련 Config -->
<add key="domainPrefix" value="" />
<add key="authCookie" value="TradeAuth_Cookie" />
<add key="authenticationTimeOut" value="120" />
<add key="authRedirectDomain" value="http://account.local-bdo.net/Member/Login?_returnUrl=https%3A%2F%2Ftrade.local-bdo.net%2FauthCallback" />
<add key="authCheckRequestUri" value="http://api-auth.local-bdo.net/api/TradeAuth?authToken=" />
<add key="authRemoveUri" value="http://account.local-bdo.net/Member/LogOut?_returnUrl=https%3A%2F%2Flocal-account.local-bdo.net" />
<!-- UTC 시간 설정 config 시작-->
<!-- 타임존 사용시 -->
<add key="UtcTimeZoneID" value="UTC" />
<!-- 서비스 지역별 UTC -->
<add key="ServiceUtcTime" value="0" />
<!-- 서버시간 사용유무 -->
<add key="isServerTime" value="true" />
<add key="branches" value="live" />
<add key="platform" value="TradeWeb" />
<add key="isDebug" value="true" />
<add key="isPAAccount" value="false" />
<add key="serviceRegion" value="NA" />
<add key="wwwDomain" value="account.local-bdo.net" />
</appSettings>
<connectionStrings>
<add name="TradeWebDB" connectionString="metadata=res://*/DB.TradeWebDB.csdl|res://*/DB.TradeWebDB.ssdl|res://*/DB.TradeWebDB.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.255.130,1433;initial catalog=SA_BETA_TRADEDB_0002;user id=CrimsonTradeReader;password=BlackNo.1Game#^%;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
<add connectionString="metadata=res://*/DB.TradeWorldDB.csdl|res://*/DB.TradeWorldDB.ssdl|res://*/DB.TradeWorldDB.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.255.130,1433;initial catalog=SA_BETA_WORLDDB_0002;persist security info=True;user id=CrimsonDesert;password=BlackNo.1Game#^%;MultipleActiveResultSets=True;App=EntityFramework"" name="TradeWORLDDB" providerName="System.Data.EntityClient" />
<add connectionString="metadata=res://*/DB.TradeLogDB.csdl|res://*/DB.TradeLogDB.ssdl|res://*/DB.TradeLogDB.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.255.130,1433;initial catalog=PF_BETA_LOGDB_0001;user id=CrimsonDesert;password=BlackNo.1Game#^%;MultipleActiveResultSets=True;App=EntityFramework"" name="TradeLogDB" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" enableVersionHeader="false" maxRequestLength="10485760" />
<globalization culture="auto" uiCulture="auto" />
<sessionState cookieName="TradeAuth_Session" mode="SQLServer" sqlConnectionString="data source=192.168.255.130,1433;uid=CrimsonWeb;pwd=BlackNo.1Game#^%" />
<machineKey decryption="AES" decryptionKey="4D70FDC82D742312862F720BBF3805C65211BD765A84A1D1" validationKey="92243B9FC458265DBAE46C4D8B4D1ED00AAC9C1AACC3BE1F16002FE0A39553C8BC8999E4B8304230768D2DE74D6FB1E2DA02BA420733B85E8E08ABBAFDDDC93E" />
<httpCookies domain="local-bdo.net" requireSSL="false" />
</system.web>
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="false">
<requestLimits maxAllowedContentLength="1073741824" maxQueryString="1048567" />
<verbs allowUnlisted="false">
<add verb="GET" allowed="true" />
<add verb="POST" allowed="true" />
</verbs>
</requestFiltering>
</security>
<httpErrors errorMode="Custom">
<remove statusCode="404" />
<error statusCode="404" path="/error" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
</system.codedom>
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="Server" />
<remove name="X-AspNetMvc-Version" />
<remove name="X-AspNet-Version" />
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
This is important don't forget this step or your server simply does not have a running market. In the 'api-trade' folder of your website there is this path 'C:\inetpub\bdo-api-trade\Contents\Common\xml\BDOWorldTradeMarketItemData\NA' and in there is all the extra configuration for the Central Market. It will run with everything default except one file. 'BDOWorldTradeMarketServerInfo' Open this and in there you need to change the IP to yours, here is my file:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<!-- 베타 -->
<WorldMarketServerInfo ServerType="0" IsInitHistory="True" IsTimerSet="True" Ip="192.168.255.130" AllowMainGroupNo="1|5|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80"/>
</root>
5. Add the Domain to your windows hosts file
For the fake domain to work you need to add it to the server's hosts file and the machine you run your client on. Every person has to do this that want's to connect to your server and use the central market of your server.
To quickly get to the file hit the Windows-Key and R at the same time, a new window will pop up.
There you put this one line in and hit enter '%windir%\system32\drivers\etc' without quotes. This will open up the folder where the hosts file is located. You can open the file with any text editor, but keep in mind that you usually need admin permissions to save the file in the same location again.
There you simply add three lines, a few lines should already be on the server side to block some stuff. On a client its usually just comments. Add the IP infront where the website is home, a tab and then the subdomain of your website
To quickly get to the file hit the Windows-Key and R at the same time, a new window will pop up.
There you put this one line in and hit enter '%windir%\system32\drivers\etc' without quotes. This will open up the folder where the hosts file is located. You can open the file with any text editor, but keep in mind that you usually need admin permissions to save the file in the same location again.
There you simply add three lines, a few lines should already be on the server side to block some stuff. On a client its usually just comments. Add the IP infront where the website is home, a tab and then the subdomain of your website
Code:
192.168.255.130 api-trade.local-bdo.net
192.168.255.130 game.local-bdo.net
192.168.255.130 trade.local-bdo.net
6. Telling your client where the market is
Now only your game client needs to know where to look at for the Central Market. Open up the service.ini of your client and under the 'NA' you need to add two lines so the full file looks like this:
With those lines you now should get market price information on your items and also be able to open up the market. The web applications need some time to boot up, you can edit them when your server is on or off does not matter, they are independent.
Just wait a moment after entering the game before trying it, you will always get, two or three errors when you are the first person trying to open the Central Market for the first time after a server boot. This will always happen and seems to be a normal part of the init process.
Code:
[SERVICE]
TYPE=NA
RES=_EN_
nationType=1
[NA]
AUTHENTIC_DOMAIN=192.168.255.130
AUTHENTIC_PORT=8888
viewTradeMarketUrl=http://trade.local-bdo.net/
gameTradeMarketUrl=http://game.local-bdo.net/
With those lines you now should get market price information on your items and also be able to open up the market. The web applications need some time to boot up, you can edit them when your server is on or off does not matter, they are independent.
Just wait a moment after entering the game before trying it, you will always get, two or three errors when you are the first person trying to open the Central Market for the first time after a server boot. This will always happen and seems to be a normal part of the init process.
The websites will generate logfiles on drive C: usually. There should be a new folder whenever the websites do things or you try to access them from inside the game. The folder is called 'palog' and inside there you should find three more folders called 'api-trade', 'gameweb', 'tradeweb'. In there are Json logfiles that log every action the web does, from starting to logging errors when things do not work the way you want them to.
If you get an Auth-Error this probably means your client sends invaled auth information and maybe can not be used. I use the client from the pack and it works fine.
If you get the 'uspIsGameMaster' expects 'atNationCode', but it was not provided error let me know i have a fix for that.
I hope this now helps all to try and setup a running central market for their server.