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
B

Bill Warner

@Bill Warner
About
Posts
9
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • FileUpload.HasFile is always false
    B Bill Warner

    Hi, I have an asp.net web forms project. No master pages, no ajax, I have a file upload control and when I fire postback the HasFiles property is always empty. I started a new asp.net project. Copy/Pasted the code into it and it worked. HasFiles was retained. Does anyone know why? The code:

    protected void Page_Init(object sender, EventArgs e)
    {
    if(IsPostBack) return;
    }

    protected void Page_Load(object sender, EventArgs e)
    {
    if(flImage.HasFile){
    Application["FileBytes"] = flImage.FileBytes;
    Application["FileContent"] = flImage.FileContent;
    Application["FileName"] = flImage.FileName;
    Application["PostedFile"] = flImage.PostedFile;
    }

    HasFile is always false.

    ASP.NET asp-net csharp question

  • Unity Application Block Error
    B Bill Warner

    Well I got it working. It's Miller time. This did the trick: Thanks a ton for your your help! There's a neat project that demos this at: http://www.codeplex.com/Download?ProjectName=unity&DownloadId=40036[^]

    C# help game-dev docker workspace

  • Unity Application Block Error
    B Bill Warner

    Amen to PITA my brother. I made the changes and still getting the same error: {"The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)":null}. I'm assuming that the issue is in the config. Maybe I'm missing something else. My code errors on :

    IUnityContainer container = new UnityContainer();
    var section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity");

            **section.Configure(container);**            
    

    var transform = container.Resolve("AddNewLabTest");

    I did see that the MApToName, TypeName and Name were all populated correctly in the Registrations section of my Unity configuration section object. Am I barking up the wrong tree?

    C# help game-dev docker workspace

  • Unity Application Block Error
    B Bill Warner

    Hi Keith, I got the config setup from an example I found online, that seems to work. All my interfaces are implemented. Everything is in the same dll FrankensteinFramework.dll. Inside it I have a namespace for Laboratory called Frankenstein.Laboratory.Interfaces. Inside there I have a method called IAddNewLabTest. The concrete implementation is done in Frankenstein.LAboratory.DTO namespace, in the method AddNewLabTest, which implements the interface. I'm still getting the same error. I've tried a number of things and can't seem to get this working. Thanks, Bill

    C# help game-dev docker workspace

  • Serious help uploading a file using C# in Asp.Net 3.5 higher
    B Bill Warner

    This sounds like a permissions issue. 405 indicates you aren't allowed access, "Resource not allowed".

    C# csharp help asp-net sysadmin json

  • Unity Application Block Error
    B Bill Warner

    Hi Keith, Still no luck. In your example I don't see the second portion of the type or a name attribute. Here is what I have right now:

    C# help game-dev docker workspace

  • Unity Application Block Error
    B Bill Warner

    Hi KEith, I tried the format buttons for code and markup and got the same result. The dll that contains the concrete class is included in the project. I'm not sure I have the namespace portions of the type tag correct. In the first part I have the type of interface and I'm not sure what the second portion is used for. Then in mapTo attribute I have the concrete implementation, the full namespace path to the concrete method and the namespace without the concrete method. Thanks, Bill

    C# help game-dev docker workspace

  • Unity Application Block Error
    B Bill Warner

    HI All, I'm trying to set up the Unity block and I'm getting the following error: "Given assembly name or codebase was invalid" My setup is as follows: private void btnUnity_Click(object sender, EventArgs e) { IUnityContainer container = new UnityContainer(); var section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity"); section.Configure(container); var transform = container.Resolve "AddNewLabTest"); } The App.Config is: <unity> <containers> <container> <types> <type type="Interfaces.ILabTest, Interfaces" mapTo="DTO.LabTest.AddNewLabTest, DTO.LabTest" name="DTO.LabTest"/> </types> </container> </containers> </unity> Any help would be appreciated. Thanks!

    C# help game-dev docker workspace

  • App.Config Encrypt section, not saving
    B Bill Warner

    Hi, I'm having difficulty getting a section of an app.config file to show as encrypted. I run the code and get no errors, but the section does not encrypt. Any help would be appreciated, I've tried other implementations from other posts here with same results: using System; using System.Windows.Forms; using System.Configuration; namespace AppConfigRedux { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btnUnprotect_Click(object sender, EventArgs e) { UnProtectSection("connectionStrings"); } private void btnProtect_Click(object sender, EventArgs e) { ProtectSection("connectionStrings", "DataProtectionConfigurationProvider"); } private void ProtectSection(string sectionName, string provider) { Configuration config = ConfigurationManager.OpenExeConfiguration(System.Windows.Forms.Application.ExecutablePath); ConfigurationSection section = config.GetSection(sectionName); if (section != null && !section.SectionInformation.IsProtected) { section.SectionInformation.ProtectSection(provider); config.Save(); } } private void UnProtectSection(string sectionName) { Configuration config = ConfigurationManager.OpenExeConfiguration(System.Windows.Forms.Application.ExecutablePath); ConfigurationSection section = config.GetSection(sectionName); if (section != null && section.SectionInformation.IsProtected) { section.SectionInformation.UnprotectSection(); config.Save(); } } } }

    C# help workspace
  • Login

  • Don't have an account? Register

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