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. Web Development
  3. ASP.NET
  4. Security(Problem with create role )[modified]

Security(Problem with create role )[modified]

Scheduled Pinned Locked Moved ASP.NET
asp-netcsharpsecurityhelptutorial
8 Posts 2 Posters 0 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.
  • P Offline
    P Offline
    papa80
    wrote on last edited by
    #1

    Hi friend please can you tell me how to solve this problem.When i try to create new role is appear this exception? " Cannot insert the value NULL into column 'RoleId', table 'C:\WEB-PROJECT\02.12.2007\APP_DATA\IVOIRENETPUB.MDF.dbo.aspnet_Roles'; column does not allow nulls. INSERT fails. " Even if i use asp.net configuration!!! Good bye -- modified at 2:46 Thursday 15th February, 2007

    when i want to read something good just seat and type it

    M 1 Reply Last reply
    0
    • P papa80

      Hi friend please can you tell me how to solve this problem.When i try to create new role is appear this exception? " Cannot insert the value NULL into column 'RoleId', table 'C:\WEB-PROJECT\02.12.2007\APP_DATA\IVOIRENETPUB.MDF.dbo.aspnet_Roles'; column does not allow nulls. INSERT fails. " Even if i use asp.net configuration!!! Good bye -- modified at 2:46 Thursday 15th February, 2007

      when i want to read something good just seat and type it

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      Then.. RoleID might be primary key or identity which is not allowed to add NULL value. if you wanna add it then you may change your database design. if I'm in wrong direction then you can show me your current table design.

      Thanks and Regards, Michael Sync Blog: http://michaelsync.net

      P 1 Reply Last reply
      0
      • M Michael Sync

        Then.. RoleID might be primary key or identity which is not allowed to add NULL value. if you wanna add it then you may change your database design. if I'm in wrong direction then you can show me your current table design.

        Thanks and Regards, Michael Sync Blog: http://michaelsync.net

        P Offline
        P Offline
        papa80
        wrote on last edited by
        #3

        hi again the table is create automaticly by visual studio when you use asp.net configuration that is way i don't change nothing but has you see is appear some exception!Did you have idea how to solve the problem. GO /****** Object: Table [dbo].[aspnet_Roles] Script Date: 02/15/2007 21:55:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[aspnet_Roles]( [ApplicationId] [uniqueidentifier] NOT NULL, [RoleId] [uniqueidentifier] NOT NULL, [RoleName] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [LoweredRoleName] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Description] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY]

        when i want to read something good just seat and type it

        M 1 Reply Last reply
        0
        • P papa80

          hi again the table is create automaticly by visual studio when you use asp.net configuration that is way i don't change nothing but has you see is appear some exception!Did you have idea how to solve the problem. GO /****** Object: Table [dbo].[aspnet_Roles] Script Date: 02/15/2007 21:55:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[aspnet_Roles]( [ApplicationId] [uniqueidentifier] NOT NULL, [RoleId] [uniqueidentifier] NOT NULL, [RoleName] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [LoweredRoleName] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Description] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY]

          when i want to read something good just seat and type it

          M Offline
          M Offline
          Michael Sync
          wrote on last edited by
          #4

          Check it out here.. >> [RoleId] [uniqueidentifier] NOT NULL, that means this column doesn't accept any NULL value. Why do you want to add NULL value? it will work if you don;t add any NULL value to this column.. However, in case you have to add NULL value then... you can remove "NOT NULL" from this statement..

          Thanks and Regards, Michael Sync Blog: http://michaelsync.net

          P 1 Reply Last reply
          0
          • M Michael Sync

            Check it out here.. >> [RoleId] [uniqueidentifier] NOT NULL, that means this column doesn't accept any NULL value. Why do you want to add NULL value? it will work if you don;t add any NULL value to this column.. However, in case you have to add NULL value then... you can remove "NOT NULL" from this statement..

            Thanks and Regards, Michael Sync Blog: http://michaelsync.net

            P Offline
            P Offline
            papa80
            wrote on last edited by
            #5

            Thank's i will try it but i am not sure that is correct because if i made change after that is possible other function to don't work.((

            when i want to read something good just seat and type it

            P M 2 Replies Last reply
            0
            • P papa80

              Thank's i will try it but i am not sure that is correct because if i made change after that is possible other function to don't work.((

              when i want to read something good just seat and type it

              P Offline
              P Offline
              papa80
              wrote on last edited by
              #6

              It can't be null because is connected with user :((

              when i want to read something good just seat and type it

              1 Reply Last reply
              0
              • P papa80

                Thank's i will try it but i am not sure that is correct because if i made change after that is possible other function to don't work.((

                when i want to read something good just seat and type it

                M Offline
                M Offline
                Michael Sync
                wrote on last edited by
                #7

                >>Thank's i will try it Your welcome. my friend. >>but i am not sure that is correct because if i made change after that is possible other function to don't work.(( ya. it might be possible.. I'd suggest you that better if you add a values for that column instead of adding NULL value.

                Thanks and Regards, Michael Sync Blog: http://michaelsync.net

                P 1 Reply Last reply
                0
                • M Michael Sync

                  >>Thank's i will try it Your welcome. my friend. >>but i am not sure that is correct because if i made change after that is possible other function to don't work.(( ya. it might be possible.. I'd suggest you that better if you add a values for that column instead of adding NULL value.

                  Thanks and Regards, Michael Sync Blog: http://michaelsync.net

                  P Offline
                  P Offline
                  papa80
                  wrote on last edited by
                  #8

                  The problem is that ms create all this table for you automaticly with lot of code and i want to use that code.If i change db after i must change code in all application and believe that is lot of work :(( i think something is not right with my db but what ?Even that thank you for your answare

                  when i want to read something good just seat and type it

                  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