Sunday, April 17, 2011

Snomtastic Phone Management System (Part 2)

Now it is time to install the Snomtastic application.

First, I will install the “Custom Authentication Provider” as the developers require. This step is absolutely vital and must be not omitted.

In Command Prompt, navigate to “C:\Snomtastic\provider” and execute “Install.cmd”




Copy the three folders - shfa.snomtastic.admin; shfa.snomtastic.phone and shfa.snomtastic.root form “C:\Snomtastic\IIS” to “C:\inetpub\wwwroot”



Open Internet Information Services (IIS) Manager...


…and create new Application Pool as shown

 
Select the newly created Application Pool, got to Advanced Settings and set "Enable 32 bit Applications" to “True” and “Load User Profile” to “True”.



Stop the Default Web Site at this point and Add Web Site: 

***Select SnomtasticPool as Application Pool and for Physical Path, select folder “shfa.snomtastic.root” located in “C:\inetpub\wwwroot”



Add two new Applications to our web site as shown:




Add HTTPS as protocol and select the Certificate we requested earlier.




Next, we must set the Authentication methods as required. The” root” site will use only Anonymous Authentication, so we are good here.

The “phone” application will use ONLY Custom Basic Authentication and so, I must make sure it is enabled:


Lastly, according the Installation manual, the “admin” application MUST use only Windows Authentication:




Next step is to edit file “web.config” located in “C:\inetpub\wwwroot\shfa.snomtastic.root”:
  1. Locate the string “Data Source=[SERVER]” and edit it to reflect your setup. In my case, this will become “Data Source=SNOMT\SNOMT” i.e. Server\SQL database
  2.  Locate “Initial Catalog=SnomTastic” and change it to “Initial Catalog=SNOMT” i.e. our Database
  3.  Locate “User Id=[username]” and change it to reflect your setup. In this case, since this is lab, I will use SA (Server Administrator) account.
  4. 1.       …and enter the appropriate password in “Password=[password]”.
 

Let’s fire up the application and see what happens:


All right! In the next post we will configure the application to work with our environment.

17 comments:

Anonymous said...

Thanks for the post,its really helpful. I have implemented snomtastic as described but its not working. Can you please help.

Server Error in '/' Application.
Could not load file or assembly 'shfa.snomtastic.data' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'shfa.snomtastic.data' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'shfa.snomtastic.data' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Drago said...

What OS you use? 32 or 64 bit. Also, did you use the bits I uploaded or the one from CodePlex?

seamvp said...

hi. i need some help. i followed your instructions to the letter but i get this error when i fire up the applicaiton. Any idea what is wrong? Could not load file or assembly 'shfa.snomtastic.data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Drago said...

Look at this: http://snomtastic.codeplex.com/discussions/235906

Email me here: temp2 at lynclog.com to tlk.

seamvp said...

Thanks for the quick response. I looked at the that discussion post but I don’t really see a solution there. I’m not a real developer so maybe I’m missing something

seamvp said...

if i use Windows 2003 32 bit and and manually install .net framework will it work?

seamvp said...

I used the bits from your site. Not from codeplex. Any input is really appriciated

Anonymous said...

Hello, thanks a lot for this great step by step manual. I do exactly what is written here ( twice :) ), but I still have this problem ....

Server Error in '/admin' Application.
--------------------------------------------------------------------------------

Could not load file or assembly 'shfa.snomtastic.admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'shfa.snomtastic.admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[BadImageFormatException: Could not load file or assembly 'shfa.snomtastic.admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: Could not load file or assembly 'shfa.snomtastic.admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +86
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126 .....

Drago said...

Look at this post for more details. If you are using 64-bit OS, a 32-bit apps must be enabled.
http://snomtastic.codeplex.com/discussions/232467?ProjectName=snomtastic

Anonymous said...

Thank you for reply. I have 32bit apps enabled. First I did it in IIS/SnomtasticPool ( Enable 32-bit applications - "True" ). Then I tried to do it with command line. ( C:\inetpub\adminscripts - cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 "true" ). I am running on Windows Server 2008 R2.

Anonymous said...

I found strange solution, after I set Enable 32-bit applications on "False" it start working.

Anonymous said...

After a lot of tries to make it works :

You have to rename the release.config under snomastic.root into web.config !

Steve@HDI said...

Well I am like all the rest. I followed the instructions I think to the letter. But something is missing. Fully patch windows server 2008 R2 With 32 bit apps enabled. I get theerror "Could not load file or assembly 'shfa.snomtastic.admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Any clues where to look?

Thanks
Steve

Steve@HDI said...

Disregard my previous post. I was using your bits, I replaced them with the ones I downloaded from, snom and it worked. ~Thanks Steve

Anonymous said...

I had the same Error - Server Error in '/admin' Application.
In IIS Manager - Application Pools - Set Application Pool Defaults - Set "Enable 32-Bit Applications" to FALSE -- It worked !!

Raymond Jorge said...

It's always good to customize the database set up of the system accordingly. In this way, it'll not eat up too much time in setting up the whole system again and again.

M E said...

This part is most tricky part, I have deployed Snomtastic two times, first on 64bit system and second on 32bit and in both cases I had the same problem that most of you guys had
"An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. "

also had many other errors, I tried different solutions but none works except one thing.

I had to replace Drago's copy of the IIS folder which contains "provider, SHFA.Snomtastic.admin/root/phone" with the once that came from the developer's copy.
only then I got the page to work and after I had problem with setting up the configuration .. I was able to fix that after deleting the file web.config and rename the file release.config to web.config and edit the file according to your configuration.

hope this helps anyone who have a problem still.