Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. WebMatrix-Following

WebMatrix-Following

Scheduled Pinned Locked Moved C#
c++csharpvisual-studiosysadminsecurity
8 Posts 4 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bram van Kampen
    wrote on last edited by
    #1

    Hi, I am new to C#, but have 20 years experience in CPP/MFC.I use Visual Studio Express for Web developers 2012 I started a Starter App to give a basic website. The Logging In procedure provided as default is already unsuitable. The website is intended to manage a User/Dealer network. Only Dealers can appoint Sub Dealers, or register customers. Self Registration isimpossible. Dealers and Customers can have multiples of Users(Which are Persons with aname, Passwords and Roles, etc.),Customers are in principle organisations in this model, which requires humans to run it. No Customer or User is required to declare any email address. Dealers are different. I know How to write code that implements this. The question is how to integrate this with webmatrix. Later on I will have to produce 'User Licence Files' These are files I produced using a fairly basic encryption system. (XOR with a known block, and transpose).It has worked quite well, and there is a substantial code base out in the world that depends on this licence format. In MFC I stored all this in a C Structure (packed to byte alignment). Do the C# and C++ structures align. Do allignment pragma's exist in C#, How does C# allign DWORDS.(Big End, Little End, or Machine Dependent) Thanks :) Bram

    Bram van Kampen

    D N D 3 Replies Last reply
    0
    • B Bram van Kampen

      Hi, I am new to C#, but have 20 years experience in CPP/MFC.I use Visual Studio Express for Web developers 2012 I started a Starter App to give a basic website. The Logging In procedure provided as default is already unsuitable. The website is intended to manage a User/Dealer network. Only Dealers can appoint Sub Dealers, or register customers. Self Registration isimpossible. Dealers and Customers can have multiples of Users(Which are Persons with aname, Passwords and Roles, etc.),Customers are in principle organisations in this model, which requires humans to run it. No Customer or User is required to declare any email address. Dealers are different. I know How to write code that implements this. The question is how to integrate this with webmatrix. Later on I will have to produce 'User Licence Files' These are files I produced using a fairly basic encryption system. (XOR with a known block, and transpose).It has worked quite well, and there is a substantial code base out in the world that depends on this licence format. In MFC I stored all this in a C Structure (packed to byte alignment). Do the C# and C++ structures align. Do allignment pragma's exist in C#, How does C# allign DWORDS.(Big End, Little End, or Machine Dependent) Thanks :) Bram

      Bram van Kampen

      D Offline
      D Offline
      David C Hobbyist
      wrote on last edited by
      #2

      Hi the weekend is a bad time to post a question. I know very little of c++ but these links might help. Custom Authentication provider by implementing IHttpModule, IPrincipal and IIdentity[^] Claim Based Authentication and WIF: Part 1[^] Hope this helps

      Frazzle the name say's it all
      Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. John F. Woods

      B 1 Reply Last reply
      0
      • D David C Hobbyist

        Hi the weekend is a bad time to post a question. I know very little of c++ but these links might help. Custom Authentication provider by implementing IHttpModule, IPrincipal and IIdentity[^] Claim Based Authentication and WIF: Part 1[^] Hope this helps

        Frazzle the name say's it all
        Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. John F. Woods

        B Offline
        B Offline
        Bram van Kampen
        wrote on last edited by
        #3

        Hi, well, you live and learn. In the MFC forum,the weekend was historically a good time to ask a question. I followed your link. I do not understand how it can possibly be relevant to my question. Please Explain. :)

        Bram van Kampen

        1 Reply Last reply
        0
        • B Bram van Kampen

          Hi, I am new to C#, but have 20 years experience in CPP/MFC.I use Visual Studio Express for Web developers 2012 I started a Starter App to give a basic website. The Logging In procedure provided as default is already unsuitable. The website is intended to manage a User/Dealer network. Only Dealers can appoint Sub Dealers, or register customers. Self Registration isimpossible. Dealers and Customers can have multiples of Users(Which are Persons with aname, Passwords and Roles, etc.),Customers are in principle organisations in this model, which requires humans to run it. No Customer or User is required to declare any email address. Dealers are different. I know How to write code that implements this. The question is how to integrate this with webmatrix. Later on I will have to produce 'User Licence Files' These are files I produced using a fairly basic encryption system. (XOR with a known block, and transpose).It has worked quite well, and there is a substantial code base out in the world that depends on this licence format. In MFC I stored all this in a C Structure (packed to byte alignment). Do the C# and C++ structures align. Do allignment pragma's exist in C#, How does C# allign DWORDS.(Big End, Little End, or Machine Dependent) Thanks :) Bram

          Bram van Kampen

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          I don't see a good reason to use WebMatrix here. You should probably stick to ASP.NET alone.

          Bram van Kampen wrote:

          In MFC I stored all this in a C Structure (packed to byte alignment). Do the C# and C++ structures align. Do allignment pragma's exist in C#, How does C# allign DWORDS.(Big End, Little End, or Machine Dependent)

          In C#, you can add a StructLayout attribute and with a kind Explicit to the structure. Something like,

          [StructLayout(LayoutKind.Explicit)]
          public struct Example
          {
          [FieldOffset(0)]
          public int foo;
          [FieldOffset(4)]
          public int bar;
          }

          This allows you to take finer control over alignment. If you write a wrapper to your native code in C++/CLI, you don't have to worry about structure alignment in C#. Just work with managed objects.

          Best wishes, Navaneeth

          B 1 Reply Last reply
          0
          • B Bram van Kampen

            Hi, I am new to C#, but have 20 years experience in CPP/MFC.I use Visual Studio Express for Web developers 2012 I started a Starter App to give a basic website. The Logging In procedure provided as default is already unsuitable. The website is intended to manage a User/Dealer network. Only Dealers can appoint Sub Dealers, or register customers. Self Registration isimpossible. Dealers and Customers can have multiples of Users(Which are Persons with aname, Passwords and Roles, etc.),Customers are in principle organisations in this model, which requires humans to run it. No Customer or User is required to declare any email address. Dealers are different. I know How to write code that implements this. The question is how to integrate this with webmatrix. Later on I will have to produce 'User Licence Files' These are files I produced using a fairly basic encryption system. (XOR with a known block, and transpose).It has worked quite well, and there is a substantial code base out in the world that depends on this licence format. In MFC I stored all this in a C Structure (packed to byte alignment). Do the C# and C++ structures align. Do allignment pragma's exist in C#, How does C# allign DWORDS.(Big End, Little End, or Machine Dependent) Thanks :) Bram

            Bram van Kampen

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            The comment frazzle made about the weekend being a bad time is, frankly, bullshit. I don't know where he got that idea from, but someone is usually volunteering their time here pretty regularly, even on the weekends.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            B 1 Reply Last reply
            0
            • N N a v a n e e t h

              I don't see a good reason to use WebMatrix here. You should probably stick to ASP.NET alone.

              Bram van Kampen wrote:

              In MFC I stored all this in a C Structure (packed to byte alignment). Do the C# and C++ structures align. Do allignment pragma's exist in C#, How does C# allign DWORDS.(Big End, Little End, or Machine Dependent)

              In C#, you can add a StructLayout attribute and with a kind Explicit to the structure. Something like,

              [StructLayout(LayoutKind.Explicit)]
              public struct Example
              {
              [FieldOffset(0)]
              public int foo;
              [FieldOffset(4)]
              public int bar;
              }

              This allows you to take finer control over alignment. If you write a wrapper to your native code in C++/CLI, you don't have to worry about structure alignment in C#. Just work with managed objects.

              Best wishes, Navaneeth

              B Offline
              B Offline
              Bram van Kampen
              wrote on last edited by
              #6

              Hi, Many Thanks. Sorry for rounding on you, but, you gave a good sensible answer. Well an Good. The C# system I'm faced with, generates dozens of files, and lengthy tutorials. Unlike MFC, it does not appear to have a meaningful Help System. If I double Click a 'System' class name and press F1, I get a list of Tutorials(if anything at all) instead of a Help file which explains the class, and what methods are available. There is no short explanation anywhere I can find,about which file does what, or how it glues together. It is to me totally unclear whether to start a Website or a Project. Does a Project contain many Websites, or does a Website contain many projects. What is the format of the End Product. An .exe or .dll file,as in MFC, a .cgi File, or what else. I fully understand Machine code and assembler code. I am fully aware how the CPP Compiler and Linker work, and how the lot comes together at run time. MFC has Header Filesand Libraries, and pragma's to include a DLL. It istotally unclear to me what happensin C#, The Bottom line is, I need to know how it works, rather than yet another tutorial on how to do something trivial. Can you help me on this. Regards :)

              Bram van Kampen

              N 1 Reply Last reply
              0
              • D Dave Kreskowiak

                The comment frazzle made about the weekend being a bad time is, frankly, bullshit. I don't know where he got that idea from, but someone is usually volunteering their time here pretty regularly, even on the weekends.

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak

                B Offline
                B Offline
                Bram van Kampen
                wrote on last edited by
                #7

                Old Chineese Saying:- "be friendly to the barbariens" :)

                Bram van Kampen

                1 Reply Last reply
                0
                • B Bram van Kampen

                  Hi, Many Thanks. Sorry for rounding on you, but, you gave a good sensible answer. Well an Good. The C# system I'm faced with, generates dozens of files, and lengthy tutorials. Unlike MFC, it does not appear to have a meaningful Help System. If I double Click a 'System' class name and press F1, I get a list of Tutorials(if anything at all) instead of a Help file which explains the class, and what methods are available. There is no short explanation anywhere I can find,about which file does what, or how it glues together. It is to me totally unclear whether to start a Website or a Project. Does a Project contain many Websites, or does a Website contain many projects. What is the format of the End Product. An .exe or .dll file,as in MFC, a .cgi File, or what else. I fully understand Machine code and assembler code. I am fully aware how the CPP Compiler and Linker work, and how the lot comes together at run time. MFC has Header Filesand Libraries, and pragma's to include a DLL. It istotally unclear to me what happensin C#, The Bottom line is, I need to know how it works, rather than yet another tutorial on how to do something trivial. Can you help me on this. Regards :)

                  Bram van Kampen

                  N Offline
                  N Offline
                  N a v a n e e t h
                  wrote on last edited by
                  #8

                  Bram van Kampen wrote:

                  The C# system I'm faced with, generates dozens of files, and lengthy tutorials. Unlike MFC, it does not appear to have a meaningful Help System. If I double Click a 'System' class name and press F1, I get a list of Tutorials(if anything at all) instead of a Help file which explains the class, and what methods are available.

                  System is not a class but a namespace. I never used to look for local help instead always check in online MSDN. They are pretty good and well documented. Try this[^]

                  Bram van Kampen wrote:

                  There is no short explanation anywhere I can find,about which file does what, or how it glues together. It is to me totally unclear whether to start a Website or a Project. Does a Project contain many Websites, or does a Website contain many projects. What is the format of the End Product. An .exe or .dll file,as in MFC, a .cgi File, or what else.

                  A project can contain several C# files which will be compiled together. Output of the compilation depends on the type of project created. If the type is a class library, you get a DLL and an executable file when the project type is Console or Windows or WPF application. Usually, you will start with creating an empty solution. Then add projects into the solution. So all the componenets in your project can be separate Visual studio projects contained in a single solution file (.sln). Now you can specify the project dependencies and how they reference each other. Let us assume that you are building a website. You will create an empty solution, add a class library to it which contains your websites core logic which don't have any dependencies with web related components. This project could contain wrapper classes to your C++ library. Then you can add a ASP.NET project to the solutuion wich references the assembly from the class library project.

                  Bram van Kampen wrote:

                  I fully understand Machine code and assembler code. I am fully aware how the CPP Compiler and Linker work, and how the lot comes together at run time. MFC has Header Filesand Libraries, and pragma's to include a DLL. It istotally unclear to me what happensin C#,

                  In C# it is simple. No header files. Just a bunch of file

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups