Coder Social home page Coder Social logo

boc's People

Contributors

bplasmeijer avatar csteeg avatar miguelmadero avatar pworst avatar rvandalen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boc's Issues

Getting Error InitBoc Error

Value cannot be null.
Parameter name: resolver
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.ArgumentNullException: Value cannot be null.
Parameter name: resolver

Source Error:

Line 17: {
Line 18: public static IDependencyResolver CreateResolver(){
Line 19: global::BoC.Persistence.SitecoreGlass.Initialize.InitBoc.Start();
Line 20:
Line 21: var config = new global::Glass.Mapper.Sc.Config();

Various errors trying to build BoC in VS2010

Hi,
I did a git clone which downloaded the solution to my hardrive. I opened the SLN file using VS2010. After doing a clean and trying to rebuild, I get various errors. Many say the following: Assembly generation failed -- Referenced assembly 'BoC' does not have a strong name. Also another says The tyep 'BoC.Persistence.BaseEntity is defined in an assembly that is not referenced. You must add a reference to assembly 'BoC, Version=1.5.00, etc...Can someone help me build BoC in VS2010? Here is a pic
2014-05-02 08_17_36-BoC - Microsoft Visual Studio

Getting the error for glass 5.13 dependency resolution

Line 22: {
Line 23: var resolver = GlassMapperScCustom.CreateResolver();
Line 24: base.CreateResolver(resolver);
Line 25: return resolver;
Line 26: }

[NullReferenceException: Object reference not set to an instance of an object.]
Glass.Mapper.Sc.Pipelines.CreateResolver.CreateResolverPipeline.Run(CreateResolverPipelineArgs args) in C:\TeamCity\buildAgent\work\9693a2d38f55a4a\Source\Glass.Mapper.Sc\Pipelines\CreateResolver\CreateResolverPipeline.cs:15
Glass.Mapper.Sc.Pipelines.Initialize.GlassMapperSc.CreateResolver(IDependencyResolver resolver) in C:\TeamCity\buildAgent\work\9693a2d38f55a4a\Source\Glass.Mapper.Sc\Pipelines\Initialize\GlassMapperSc.cs:58
Mercer.Belong.Foundation.GlassORM.App_Start.GlassMapperSc.CreateResolver() in D:\BelongSitecore9\src\Foundation\GlassORM\Mercer.Belong.Foundation.GlassORM\App_Start\GlassMapperSc.cs:24
Glass.Mapper.Sc.Pipelines.Initialize.GlassMapperSc.Start(String contextName) in C:\TeamCity\buildAgent\work\9693a2d38f55a4a\Source\Glass.Mapper.Sc\Pipelines\Initialize\GlassMapperSc.cs:33
(Object , Object ) +13
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +483
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +235
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +21
Sitecore.Nexus.Web.HttpModule.Application_Start() +160
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +766
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +580
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +167
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +276
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +368

[HttpException (0x80004005): Object reference not set to an instance of an object.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +714

Please Make CompiledVirtualPathProvider.GetCompiledType public

class CompiledVirtualPathProvider
method: GetCompiledType
Request: Please make this method public

Reason: I have made a couple of Razor extensions that need to load resources relative to where the compiled pages live. I do know that I could have called your public GetFile method, but that is needlessly expensive. I get the VirtualPathProvider and then cast it to your provider. I then get the type and load the correct resources from that assembly.

var compiledVirtualPath = (CompiledVirtualPathProvider)HostingEnvironment.VirtualPathProvider;
var compiledType = compiledVirtualPath.GetCompiledType(page.VirtualPath);

As a result, I not only have compiled views in assemblies, but I have localized versions of those views in their own assemblies as well as contextual resources. I used the following for that
http://brianreiter.org/2011/03/23/simple-asp-net-mvc-globalization-with-graceful-fallback/

namespace RazorExtensions.Compiled
{
public static class Extensions
{
public static string GlobalLocalResources(this WebViewPage page, string key)
{
var compiledVirtualPath = (CompiledVirtualPathProvider)HostingEnvironment.VirtualPathProvider;
var compiledType = compiledVirtualPath.GetCompiledType(page.VirtualPath);
if (compiledType.Namespace != null)
{
var endIndex = compiledType.Namespace.IndexOf('.');
var rootNameSpace = compiledType.Namespace.Substring(0, endIndex);

            // Gets a reference to the same assembly that 
            // contains the type that is creating the ResourceManager.
            var resource = rootNameSpace + ".App_GlobalResources." + "Global";

            // Creates the ResourceManager.
            var myManager = new System.Resources.ResourceManager(resource, compiledType.Assembly);

            var myString = myManager.GetString(key);
            return myString;
        }
        return null;
    }
    public static string LocalResources(this WebViewPage page, string key)
    {
        var compiledVirtualPath = (CompiledVirtualPathProvider)HostingEnvironment.VirtualPathProvider;
        var compiledType = compiledVirtualPath.GetCompiledType(page.VirtualPath);
        var startIndex = page.VirtualPath.LastIndexOf('/') + 1;
        var endIndex = page.VirtualPath.LastIndexOf('.');

        var endResource = page.VirtualPath.Substring(startIndex, endIndex - startIndex);
        // Gets a reference to the same assembly that 
        // contains the type that is creating the ResourceManager.
        var resource = compiledType.Namespace + ".App_LocalResources." + endResource;

        // Creates the ResourceManager.
        var myManager = new System.Resources.ResourceManager(resource, compiledType.Assembly);

        var myString = myManager.GetString(key);
        return myString;
    }
}

}

Assembly Information Displayed in MVC4 Views

Using precompiled views and the ApplicationPartRegistry with RazorGenerator (from CodePlex) and MVC4, there is a string of the assembly information that is displayed when the view is rendered in the host. I don't see the string in an MVC3 project.

I am building the view DLLs in a separate project altogether. The text that is displayed invariably looks something like the following:
, MyProject.ViewDllName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=

It is just output as plain text in line, not rendered in a tag of any kind, and always right before the HTML of the view is rendered/output. There's nothing before the , at the start nor after the = at the end

This is true of full ActionResults and views that are rendered via calls to RenderPartial. If I decompile the source of the view in the DLL, there does not seem to be any statements that would output this text.

Do you have any ideas as to what might be causing this text to be output?

Thanks in advance,
MisterJames

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.