Microsoft Visual Studio 2022 LocalDB

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-17 22:42

Hello!

I'm trying to use a LocalDB inside Visual Studio 2022 but hMailServer can't seem connect to the server :( .

I tried to create a new DB with hMailServer using the [sa] account and Windows Authentication but it always gives this error message:
Starting task...
Please wait while creating database...
ADO: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

This is the configuration that I'm using:
Database Server Address
(localdb)\MSSQLLocalDB --> Already tried without the (localdb)

Database Name
hmailserverdb

Authentication
Use Windows Authentication --> Tried with the [sa] account too

Any help is appreciated!

Sincerely,
PandemicOfNukes

User avatar
johang
Senior user
Senior user
Posts: 1154
Joined: 2008-09-01 09:20

Re: Microsoft Visual Studio 2022 LocalDB

Post by johang » 2024-05-18 08:14

could it be that hmailserver is 32bit and VS 2022 is 64 bit, ( you need a 32 bit db connector i have no clue of which connector you could use perhaps test with vs 2019 and below being 32 bit )
lets cheat darwin out of his legacy, find a cure for cancer...

PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Re: Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-18 17:58

Maybe thats the problem. But I need some things in VS 2022 :(

Oh well I wont use a LocalDB for the project, I will just use a Microsoft SQL Server the results will be the same (still going to test the solution tho and post the results here in case someone has the same problem).

Thanks man I really appreciate it :)


Sincerely,
PandemicOfNukes

PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Re: Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-18 19:31

Ok tested with VS 2019 and folks I can confirm that localDB doesn't work :(

So if in the future someone is trying to make it work, please don't waste hours like I did yesterday.

Sincerely,
PandemicOfNukes

User avatar
jim.bus
Senior user
Senior user
Posts: 1618
Joined: 2011-05-28 11:49
Location: US

Re: Microsoft Visual Studio 2022 LocalDB

Post by jim.bus » 2024-05-18 19:45

PandemicOfNukes wrote:
2024-05-18 19:31
Ok tested with VS 2019 and folks I can confirm that localDB doesn't work :(

So if in the future someone is trying to make it work, please don't waste hours like I did yesterday.

Sincerely,
PandemicOfNukes
I almost sent this to you last night but was unsure of exactly what you were doing but I'm sending it now. Note that people also use Maria DB which is equivalent to MySQL.

https://www.hmailserver.com/documentati ... ase_engine
If you think you understand quantum mechanics, you don't understand quantum mechanics.

User avatar
SorenR
Senior user
Senior user
Posts: 6348
Joined: 2006-08-21 15:38
Location: Denmark

Re: Microsoft Visual Studio 2022 LocalDB

Post by SorenR » 2024-05-18 23:01

SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Re: Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-19 21:02

jim.bus wrote:
2024-05-18 19:45
PandemicOfNukes wrote:
2024-05-18 19:31
Ok tested with VS 2019 and folks I can confirm that localDB doesn't work :(

So if in the future someone is trying to make it work, please don't waste hours like I did yesterday.

Sincerely,
PandemicOfNukes
I almost sent this to you last night but was unsure of exactly what you were doing but I'm sending it now. Note that people also use Maria DB which is equivalent to MySQL.

https://www.hmailserver.com/documentati ... ase_engine
Honestly, I would love to use MySQL the problem is that my college teacher wants Microsoft SQL Server and nothing else.

I don't know why but hes the boss (even if its not the best option)

Sincerely,
PandemicOfNukes

User avatar
SorenR
Senior user
Senior user
Posts: 6348
Joined: 2006-08-21 15:38
Location: Denmark

Re: Microsoft Visual Studio 2022 LocalDB

Post by SorenR » 2024-05-19 22:39

PandemicOfNukes wrote:
2024-05-19 21:02
jim.bus wrote:
2024-05-18 19:45
PandemicOfNukes wrote:
2024-05-18 19:31
Ok tested with VS 2019 and folks I can confirm that localDB doesn't work :(

So if in the future someone is trying to make it work, please don't waste hours like I did yesterday.

Sincerely,
PandemicOfNukes
I almost sent this to you last night but was unsure of exactly what you were doing but I'm sending it now. Note that people also use Maria DB which is equivalent to MySQL.

https://www.hmailserver.com/documentati ... ase_engine
Honestly, I would love to use MySQL the problem is that my college teacher wants Microsoft SQL Server and nothing else.

I don't know why but hes the boss (even if its not the best option)

Sincerely,
PandemicOfNukes
College teachers are usually not the sharpest spoon in the drawer ... If they were - they would have a proper tech job :mrgreen:

I have 35+ years in the ISP/Telco business world (solutions architecture and systems engineering usually ranked just below GM/COO) having worked with customers in 42 countries. Next to Oracle on 64 cpu Unix servers I like MariaDB simply because Oracle broke MySQL. Yes, MariaDB is what MySQL used to be back in the day!

I don't work any more. I now live on 12 acers. I have two nice white structures with thatched roofs by the coast of NW Sealand, Denmark. I use my 1952 Grey Fergie to mow the lawn and my closest neighbour is a RAMSAR/NATURA 2000 bird sanctuary covering around 110,500 acers.
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

User avatar
jim.bus
Senior user
Senior user
Posts: 1618
Joined: 2011-05-28 11:49
Location: US

Re: Microsoft Visual Studio 2022 LocalDB

Post by jim.bus » 2024-05-20 01:22

PandemicOfNukes wrote:
2024-05-19 21:02
jim.bus wrote:
2024-05-18 19:45
PandemicOfNukes wrote:
2024-05-18 19:31
Ok tested with VS 2019 and folks I can confirm that localDB doesn't work :(

So if in the future someone is trying to make it work, please don't waste hours like I did yesterday.

Sincerely,
PandemicOfNukes
I almost sent this to you last night but was unsure of exactly what you were doing but I'm sending it now. Note that people also use Maria DB which is equivalent to MySQL.

https://www.hmailserver.com/documentati ... ase_engine
Honestly, I would love to use MySQL the problem is that my college teacher wants Microsoft SQL Server and nothing else.

I don't know why but hes the boss (even if its not the best option)

Sincerely,
PandemicOfNukes
Based on what you've said so far, nothing says you can't run hMailServer using MySQL or Maria DB and use LocalDB for what the Teacher wants. In other words, you can have two database servers and use MySQL or Maria DB separate from whatever your Teacher wants you to use localDB for.

Your teacher probably wants you to use LocalDb because it is a version of MS SQL Server. MS SQL from what I could see of it seemed to be harder to use than MySQL or probably Maria DB as well. But again nothing says you can't run MySQL or Maria DB just for use with hMailServer.
If you think you understand quantum mechanics, you don't understand quantum mechanics.

PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Re: Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-20 03:28

jim.bus wrote:
2024-05-20 01:22
PandemicOfNukes wrote:
2024-05-19 21:02
jim.bus wrote:
2024-05-18 19:45


I almost sent this to you last night but was unsure of exactly what you were doing but I'm sending it now. Note that people also use Maria DB which is equivalent to MySQL.

https://www.hmailserver.com/documentati ... ase_engine
Honestly, I would love to use MySQL the problem is that my college teacher wants Microsoft SQL Server and nothing else.

I don't know why but hes the boss (even if its not the best option)

Sincerely,
PandemicOfNukes
Based on what you've said so far, nothing says you can't run hMailServer using MySQL or Maria DB and use LocalDB for what the Teacher wants. In other words, you can have two database servers and use MySQL or Maria DB separate from whatever your Teacher wants you to use localDB for.

Your teacher probably wants you to use LocalDb because it is a version of MS SQL Server. MS SQL from what I could see of it seemed to be harder to use than MySQL or probably Maria DB as well. But again nothing says you can't run MySQL or Maria DB just for use with hMailServer.
That's actually a good idea... Im going to give it a thought thank you really.

Hey I know I really should make another forum post but I'm going to put here anyway. So I was doing the project and everything was going nicely but suddenly I get this ASP.NET error about the Interhop.hmailserver.dll and I searched the net and didn't find anything.... This error is strange the first time I referenced the DLL and it worked I managed to register accounts and login even (the accounts were inside the hmailserver and I registered trough the webpage I created) and I'm getting desperate:

Code: Select all

Server Error in '/' Application.
Could not load file or assembly 'Interop.hMailServer' 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 'Interop.hMailServer' 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 'Interop.hMailServer' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = Interop.hMailServer
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Interop.hMailServer | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/GAMER/source/repos/ProjetoTI3/ProjetoTI3/
LOG: Initial PrivatePath = C:\Users\GAMER\source\repos\ProjetoTI3\ProjetoTI3\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\GAMER\source\repos\ProjetoTI3\ProjetoTI3\web.config
LOG: Using host configuration file: C:\Users\GAMER\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/vs/65b92354/38fa6fd0/Interop.hMailServer.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/vs/65b92354/38fa6fd0/Interop.hMailServer/Interop.hMailServer.DLL.
LOG: Attempting download of new URL file:///C:/Users/GAMER/source/repos/ProjetoTI3/ProjetoTI3/bin/Interop.hMailServer.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

Stack Trace:


[BadImageFormatException: Could not load file or assembly 'Interop.hMailServer' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +232
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +113
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +23
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +49

[ConfigurationErrorsException: Could not load file or assembly 'Interop.hMailServer' 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) +762
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +259
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +167
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +238
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +78
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +334
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +178
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +746

[HttpException (0x80004005): Could not load file or assembly 'Interop.hMailServer' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +732

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9232.0
If anyone has any idea I would love it to hear it.

Sincerely,
PandemicOfNukes

User avatar
jim.bus
Senior user
Senior user
Posts: 1618
Joined: 2011-05-28 11:49
Location: US

Re: Microsoft Visual Studio 2022 LocalDB

Post by jim.bus » 2024-05-20 04:55

PandemicOfNukes wrote:
2024-05-20 03:28

Hey I know I really should make another forum post but I'm going to put here anyway. So I was doing the project and everything was going nicely but suddenly I get this ASP.NET error about the Interhop.hmailserver.dll and I searched the net and didn't find anything.... This error is strange the first time I referenced the DLL and it worked I managed to register accounts and login even (the accounts were inside the hmailserver and I registered trough the webpage I created) and I'm getting desperate:

Code: Select all

Server Error in '/' Application.


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9232.0
If anyone has any idea I would love it to hear it.

Sincerely,
PandemicOfNukes
This really isn't my Forte but check that this Windows Feature is turned on: '.Network 3.5 (includes .Net 2.0 and 3.o)'. You will find it under Control Panel>Programs and Features>Turn Windows features on or off.

And check in same area that '.Net Framework 4.8 Advanced Services' is turned on. This is a new one for me but you do something differenct than what most people do and your error message seems to reference .Net Framework 4.8 as well.
If you think you understand quantum mechanics, you don't understand quantum mechanics.

PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Re: Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-20 10:54

jim.bus wrote:
2024-05-20 04:55
PandemicOfNukes wrote:
2024-05-20 03:28

Hey I know I really should make another forum post but I'm going to put here anyway. So I was doing the project and everything was going nicely but suddenly I get this ASP.NET error about the Interhop.hmailserver.dll and I searched the net and didn't find anything.... This error is strange the first time I referenced the DLL and it worked I managed to register accounts and login even (the accounts were inside the hmailserver and I registered trough the webpage I created) and I'm getting desperate:

Code: Select all

Server Error in '/' Application.


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9232.0
If anyone has any idea I would love it to hear it.

Sincerely,
PandemicOfNukes
This really isn't my Forte but check that this Windows Feature is turned on: '.Network 3.5 (includes .Net 2.0 and 3.o)'. You will find it under Control Panel>Programs and Features>Turn Windows features on or off.

And check in same area that '.Net Framework 4.8 Advanced Services' is turned on. This is a new one for me but you do something differenct than what most people do and your error message seems to reference .Net Framework 4.8 as well.
I already had them activated which increases the weirdness of this error, I have no idea of what happened :lol:

Sincerely,
PandemicOfNukes

User avatar
jim.bus
Senior user
Senior user
Posts: 1618
Joined: 2011-05-28 11:49
Location: US

Re: Microsoft Visual Studio 2022 LocalDB

Post by jim.bus » 2024-05-20 11:45

PandemicOfNukes wrote:
2024-05-20 10:54
jim.bus wrote:
2024-05-20 04:55
PandemicOfNukes wrote:
2024-05-20 03:28

Hey I know I really should make another forum post but I'm going to put here anyway. So I was doing the project and everything was going nicely but suddenly I get this ASP.NET error about the Interhop.hmailserver.dll and I searched the net and didn't find anything.... This error is strange the first time I referenced the DLL and it worked I managed to register accounts and login even (the accounts were inside the hmailserver and I registered trough the webpage I created) and I'm getting desperate:

Code: Select all

Server Error in '/' Application.


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9232.0
If anyone has any idea I would love it to hear it.

Sincerely,
PandemicOfNukes
This really isn't my Forte but check that this Windows Feature is turned on: '.Network 3.5 (includes .Net 2.0 and 3.o)'. You will find it under Control Panel>Programs and Features>Turn Windows features on or off.

And check in same area that '.Net Framework 4.8 Advanced Services' is turned on. This is a new one for me but you do something differenct than what most people do and your error message seems to reference .Net Framework 4.8 as well.
I already had them activated which increases the weirdness of this error, I have no idea of what happened :lol:

Sincerely,
PandemicOfNukes
Again, not my area of expertise but you are using what appears to be a C:/Windows/Microsoft.Net/Framework64 file which I have to assume means what you are using is 64bit. I don't know if this is truly a problem but again hMailServer is 32bit not 64bit and there could be an incompatibility.

I, too, use these to features and I'm assuming they too would be 64bit, since my Windows, with my hMailServer, but then again I'm not trying to Compile or Assemble anything either and that could be where your problem lies. I see references in the logs you supply which seem to indicate you are trying to Compile or Assemble something.
If you think you understand quantum mechanics, you don't understand quantum mechanics.

PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Re: Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-20 12:20

jim.bus wrote:
2024-05-20 11:45
PandemicOfNukes wrote:
2024-05-20 10:54
jim.bus wrote:
2024-05-20 04:55


This really isn't my Forte but check that this Windows Feature is turned on: '.Network 3.5 (includes .Net 2.0 and 3.o)'. You will find it under Control Panel>Programs and Features>Turn Windows features on or off.

And check in same area that '.Net Framework 4.8 Advanced Services' is turned on. This is a new one for me but you do something differenct than what most people do and your error message seems to reference .Net Framework 4.8 as well.
I already had them activated which increases the weirdness of this error, I have no idea of what happened :lol:

Sincerely,
PandemicOfNukes
Again, not my area of expertise but you are using what appears to be a C:/Windows/Microsoft.Net/Framework64 file which I have to assume means what you are using is 64bit. I don't know if this is truly a problem but again hMailServer is 32bit not 64bit and there could be an incompatibility.

I, too, use these to features and I'm assuming they too would be 64bit, since my Windows, with my hMailServer, but then again I'm not trying to Compile or Assemble anything either and that could be where your problem lies. I see references in the logs you supply which seem to indicate you are trying to Compile or Assemble something.
So I have no idea why but I made a new application and made it to 32Bit but when I try to run I get this:

Code: Select all

Server Error in '/' Application.
Could not load file or assembly 'WebApplication6' 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 'WebApplication6' 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 'WebApplication6' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = WebApplication6
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: WebApplication6 | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/GAMER/source/repos/WebApplication6/WebApplication6/
LOG: Initial PrivatePath = C:\Users\GAMER\source\repos\WebApplication6\WebApplication6\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\GAMER\source\repos\WebApplication6\WebApplication6\web.config
LOG: Using host configuration file: C:\Users\GAMER\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/GAMER/AppData/Local/Temp/Temporary ASP.NET Files/vs/5fad7dc9/cfb9f537/WebApplication6.DLL.
LOG: Attempting download of new URL file:///C:/Users/GAMER/AppData/Local/Temp/Temporary ASP.NET Files/vs/5fad7dc9/cfb9f537/WebApplication6/WebApplication6.DLL.
LOG: Attempting download of new URL file:///C:/Users/GAMER/source/repos/WebApplication6/WebApplication6/bin/WebApplication6.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

Stack Trace:


[BadImageFormatException: Could not load file or assembly 'WebApplication6' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +232
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +113
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +23
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +49

[ConfigurationErrorsException: Could not load file or assembly 'WebApplication6' 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) +762
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +259
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +167
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +238
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +78
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +334
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +178
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +746

[HttpException (0x80004005): Could not load file or assembly 'WebApplication6' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +732

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9232.0
Its still using the Framework64 folder...

PS - Would I need Interhop.hmailserver.dll if I had a SQL Server? (Probably a dumb question but I'm at my limit)

Sincerely,
PandemicOfNukes

User avatar
jim.bus
Senior user
Senior user
Posts: 1618
Joined: 2011-05-28 11:49
Location: US

Re: Microsoft Visual Studio 2022 LocalDB

Post by jim.bus » 2024-05-20 18:01

Again as I've stated this is out of my expertise area. However, what has the log/error entries you've shown anything to do with hMailServer which would take this even further out of my expertise. My guess is you are having a problem now with whatever project you are doing for your teacher and not hMailServer. If this is true then why would you need interhop.hMailServer.dll as hMailServer would be standalone and not interface at all with SQL Server. You seemed to state you were going to try installing with MySQL or MariaDB.

I believe if you are still seeing the same Framework folder which I'm guessing you mean Framework64 that may be expected because you are probably running with a 64bit Windows. While I never have installed hMailServer in an IIS environment, I wouldn't think you would be getting these particular errors due to installing hMailServer which is why I'm suspecting this is a part of your school project for which I haven't got a clue. You also didn't seem to state that your school project would interface with hMailServer which makes me suspect these problems are more related to your school project for which I haven't any expertise. But again, as I stated, I haven't done anything with IIS environment so I don't want to lead you astray with any guesses.
If you think you understand quantum mechanics, you don't understand quantum mechanics.

PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Re: Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-20 18:44

jim.bus wrote:
2024-05-20 18:01
Again as I've stated this is out of my expertise area. However, what has the log/error entries you've shown anything to do with hMailServer which would take this even further out of my expertise. My guess is you are having a problem now with whatever project you are doing for your teacher and not hMailServer. If this is true then why would you need interhop.hMailServer.dll as hMailServer would be standalone and not interface at all with SQL Server. You seemed to state you were going to try installing with MySQL or MariaDB.

I believe if you are still seeing the same Framework folder which I'm guessing you mean Framework64 that may be expected because you are probably running with a 64bit Windows. While I never have installed hMailServer in an IIS environment, I wouldn't think you would be getting these particular errors due to installing hMailServer which is why I'm suspecting this is a part of your school project for which I haven't got a clue. You also didn't seem to state that your school project would interface with hMailServer which makes me suspect these problems are more related to your school project for which I haven't any expertise. But again, as I stated, I haven't done anything with IIS environment so I don't want to lead you astray with any guesses.
First of all I want to thank you for all the help you tried to give to me I really appreciate it :)

And yeah I think I could have been clearer of what I wanted to do. So my Uni project is that we make a website in ASP.NET using everything and more of what we have gave on the class. My idea was making an Intranet Email Service using HMailServer because I already made the *almost* same project but on the previous class where it was the same teacher as of now (I would give a link to the project that is on my github but because of the rules I can't post outside links before reaching 15 posts). That project was made using PHP and that's why I knew (or more accurately thought) that HMailServer would also work on this new project. In the beginning I had that localDB problem and after that I just used Microsoft SQL Server 2022 and it was resolved and then I was actually successful, I managed to reference Interhop.hmailserver.dll and managed to create accounts directly on the ASP.NET site but suddenly puuuffff it just stopped, it didn't run anymore. That's when I came here for help and I think everybody following already knows the rest and now I'm strongly considering rethinking the project.

PS - I think its understood by now that English is not my first language so apologies if I make errors or I can't express myself well.

Sincerely,
PandemicOfNukes

User avatar
jim.bus
Senior user
Senior user
Posts: 1618
Joined: 2011-05-28 11:49
Location: US

Re: Microsoft Visual Studio 2022 LocalDB

Post by jim.bus » 2024-05-20 19:50

PandemicOfNukes wrote:
2024-05-20 18:44
jim.bus wrote:
2024-05-20 18:01
Again as I've stated this is out of my expertise area. However, what has the log/error entries you've shown anything to do with hMailServer which would take this even further out of my expertise. My guess is you are having a problem now with whatever project you are doing for your teacher and not hMailServer. If this is true then why would you need interhop.hMailServer.dll as hMailServer would be standalone and not interface at all with SQL Server. You seemed to state you were going to try installing with MySQL or MariaDB.

I believe if you are still seeing the same Framework folder which I'm guessing you mean Framework64 that may be expected because you are probably running with a 64bit Windows. While I never have installed hMailServer in an IIS environment, I wouldn't think you would be getting these particular errors due to installing hMailServer which is why I'm suspecting this is a part of your school project for which I haven't got a clue. You also didn't seem to state that your school project would interface with hMailServer which makes me suspect these problems are more related to your school project for which I haven't any expertise. But again, as I stated, I haven't done anything with IIS environment so I don't want to lead you astray with any guesses.
First of all I want to thank you for all the help you tried to give to me I really appreciate it :)

And yeah I think I could have been clearer of what I wanted to do. So my Uni project is that we make a website in ASP.NET using everything and more of what we have gave on the class. My idea was making an Intranet Email Service using HMailServer because I already made the *almost* same project but on the previous class where it was the same teacher as of now (I would give a link to the project that is on my github but because of the rules I can't post outside links before reaching 15 posts). That project was made using PHP and that's why I knew (or more accurately thought) that HMailServer would also work on this new project. In the beginning I had that localDB problem and after that I just used Microsoft SQL Server 2022 and it was resolved and then I was actually successful, I managed to reference Interhop.hmailserver.dll and managed to create accounts directly on the ASP.NET site but suddenly puuuffff it just stopped, it didn't run anymore. That's when I came here for help and I think everybody following already knows the rest and now I'm strongly considering rethinking the project.

PS - I think its understood by now that English is not my first language so apologies if I make errors or I can't express myself well.

Sincerely,
PandemicOfNukes
First. Your English isn't that bad compared to some others (not that I'm being critical of the others).

Again I don't want to lead you astray as I'm not really familiar at all with working in IIS but hMailServer is really standalone. For that matter, hMailServer could be running on a totally different computer and could be accessed I would believe from Client applications running in the IIS environment. hMailServer does have an Administration application other than hMailAdmin which is called PhpWebAdmin which would allow you supposedly to administer hMailServer similar to hMailAdmin Administration tool. But I'm not familiar with PhpWebAdmin but with it you can create user accounts in hMailServer. I would suspect PhpWebAdmin would run in your IIS environment and I believe it is an application that would run on a website. You should be able to find the PhpWebAdmin stored in the C:\Program Files (x86)\hMailServer folder. I don't know if this is what you would be looking for though.
If you think you understand quantum mechanics, you don't understand quantum mechanics.

PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Re: Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-21 02:10

I was curious and I tested with VS 2019 and the reference worked... I don't know why.

Yet again thanks for all of your help. Appreciate it.

Sincerely,
PandemicOfNukes

User avatar
jim.bus
Senior user
Senior user
Posts: 1618
Joined: 2011-05-28 11:49
Location: US

Re: Microsoft Visual Studio 2022 LocalDB

Post by jim.bus » 2024-05-21 04:44

PandemicOfNukes wrote:
2024-05-21 02:10
I was curious and I tested with VS 2019 and the reference worked... I don't know why.

Yet again thanks for all of your help. Appreciate it.

Sincerely,
PandemicOfNukes
Which would imply that VS2022 is possibly looking for a feature in Windows, IIS, or in your environment that is not available in your environment.
If you think you understand quantum mechanics, you don't understand quantum mechanics.

PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Re: Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-21 10:45

Well then I guess problem solved :mrgreen: :mrgreen: :mrgreen:

Sincerely,
PandemicOfNukes

User avatar
jim.bus
Senior user
Senior user
Posts: 1618
Joined: 2011-05-28 11:49
Location: US

Re: Microsoft Visual Studio 2022 LocalDB

Post by jim.bus » 2024-05-21 11:20

PandemicOfNukes wrote:
2024-05-21 10:45
Well then I guess problem solved :mrgreen: :mrgreen: :mrgreen:

Sincerely,
PandemicOfNukes
I can't say if this is necessary but you might need to determine what is missing in your environment, if it is your environment that's causing the issue, and correct that problem with what is missing. It might even be some setting or configuration problem. But assuming the problem is solved is not necessarily correct unless you don't have a requirement to use VS2022.
If you think you understand quantum mechanics, you don't understand quantum mechanics.

PandemicOfNukes
New user
New user
Posts: 11
Joined: 2024-05-17 22:31

Re: Microsoft Visual Studio 2022 LocalDB

Post by PandemicOfNukes » 2024-05-22 01:07

jim.bus wrote:
2024-05-21 11:20
PandemicOfNukes wrote:
2024-05-21 10:45
Well then I guess problem solved :mrgreen: :mrgreen: :mrgreen:

Sincerely,
PandemicOfNukes
I can't say if this is necessary but you might need to determine what is missing in your environment, if it is your environment that's causing the issue, and correct that problem with what is missing. It might even be some setting or configuration problem. But assuming the problem is solved is not necessarily correct unless you don't have a requirement to use VS2022.
i just needed some updated packages nothing much. I tried my best recreating the environment of VS 2022 to VS 2019 gave a little bit of work but I did it... Its working right now with no problems and while I should search what was missing I need to start working on the project.

Sincerely,
PandemicOfNukes

Post Reply